bridgefy-react-native 1.1.8 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +582 -112
  3. package/android/build.gradle +36 -56
  4. package/android/gradle.properties +4 -4
  5. package/android/src/main/AndroidManifest.xml +1 -11
  6. package/android/src/main/java/me/bridgefy/plugin/react_native/BridgefyReactNativeModule.kt +609 -332
  7. package/android/src/main/java/me/bridgefy/plugin/react_native/BridgefyReactNativePackage.kt +25 -8
  8. package/android/src/main/java/me/bridgefy/plugin/react_native/service/BridgefyService.kt +625 -0
  9. package/android/src/main/java/me/bridgefy/plugin/react_native/util/BridgefyOperationModeManager.kt +193 -0
  10. package/android/src/main/java/me/bridgefy/plugin/react_native/util/BridgefyServiceManager.kt +123 -0
  11. package/android/src/main/java/me/bridgefy/plugin/react_native/util/Utils.kt +172 -0
  12. package/bridgefy-react-native.podspec +5 -25
  13. package/ios/BridgefyReactNativeModule.m +88 -0
  14. package/ios/BridgefyReactNativeModule.swift +524 -0
  15. package/lib/module/NativeBridgefy.js +114 -0
  16. package/lib/module/NativeBridgefy.js.map +1 -0
  17. package/lib/module/index.js +167 -208
  18. package/lib/module/index.js.map +1 -1
  19. package/lib/module/package.json +1 -0
  20. package/lib/typescript/package.json +1 -0
  21. package/lib/typescript/src/NativeBridgefy.d.ts +248 -0
  22. package/lib/typescript/src/NativeBridgefy.d.ts.map +1 -0
  23. package/lib/typescript/src/index.d.ts +140 -0
  24. package/lib/typescript/src/index.d.ts.map +1 -0
  25. package/package.json +77 -74
  26. package/src/NativeBridgefy.ts +317 -0
  27. package/src/index.tsx +270 -226
  28. package/ios/BridgefyReactNative.m +0 -56
  29. package/ios/BridgefyReactNative.swift +0 -368
  30. package/ios/BridgefyReactNative.xcodeproj/project.pbxproj +0 -293
  31. package/ios/BridgefyReactNative.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  32. package/ios/BridgefyReactNative.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  33. package/ios/BridgefyReactNative.xcodeproj/project.xcworkspace/xcuserdata/bridgefy.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  34. package/ios/BridgefyReactNative.xcodeproj/xcuserdata/bridgefy.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  35. package/ios/Frameworks/BridgefySDK.xcframework/Info.plist +0 -48
  36. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/BridgefySDK +0 -0
  37. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Headers/BridgefySDK-Swift.h +0 -317
  38. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Headers/BridgefySDK.h +0 -15
  39. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Info.plist +0 -0
  40. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.abi.json +0 -5523
  41. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.private.swiftinterface +0 -116
  42. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  43. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.swiftinterface +0 -116
  44. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/module.modulemap +0 -11
  45. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/_CodeSignature/CodeResources +0 -190
  46. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/dSYMs/BridgefySDK.framework.dSYM/Contents/Info.plist +0 -20
  47. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/DWARF/BridgefySDK +0 -0
  48. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/Relocations/aarch64/BridgefySDK.yml +0 -12529
  49. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/BridgefySDK +0 -0
  50. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Headers/BridgefySDK-Swift.h +0 -630
  51. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Headers/BridgefySDK.h +0 -15
  52. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Info.plist +0 -0
  53. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.abi.json +0 -5523
  54. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +0 -116
  55. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  56. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +0 -116
  57. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +0 -5523
  58. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +0 -116
  59. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  60. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +0 -116
  61. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/module.modulemap +0 -11
  62. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/_CodeSignature/CodeResources +0 -245
  63. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Info.plist +0 -20
  64. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/DWARF/BridgefySDK +0 -0
  65. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/Relocations/aarch64/BridgefySDK.yml +0 -12276
  66. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/Relocations/x86_64/BridgefySDK.yml +0 -11932
  67. package/lib/commonjs/index.js +0 -278
  68. package/lib/commonjs/index.js.map +0 -1
  69. package/lib/commonjs/infraestructure/index.js +0 -28
  70. package/lib/commonjs/infraestructure/index.js.map +0 -1
  71. package/lib/commonjs/infraestructure/interfaces/ibridgefy.js +0 -6
  72. package/lib/commonjs/infraestructure/interfaces/ibridgefy.js.map +0 -1
  73. package/lib/commonjs/infraestructure/interfaces/index.js +0 -17
  74. package/lib/commonjs/infraestructure/interfaces/index.js.map +0 -1
  75. package/lib/commonjs/infraestructure/services/bridgefy_service.js +0 -6
  76. package/lib/commonjs/infraestructure/services/bridgefy_service.js.map +0 -1
  77. package/lib/commonjs/infraestructure/services/index.js +0 -17
  78. package/lib/commonjs/infraestructure/services/index.js.map +0 -1
  79. package/lib/module/infraestructure/index.js +0 -3
  80. package/lib/module/infraestructure/index.js.map +0 -1
  81. package/lib/module/infraestructure/interfaces/ibridgefy.js +0 -2
  82. package/lib/module/infraestructure/interfaces/ibridgefy.js.map +0 -1
  83. package/lib/module/infraestructure/interfaces/index.js +0 -2
  84. package/lib/module/infraestructure/interfaces/index.js.map +0 -1
  85. package/lib/module/infraestructure/services/bridgefy_service.js +0 -2
  86. package/lib/module/infraestructure/services/bridgefy_service.js.map +0 -1
  87. package/lib/module/infraestructure/services/index.js +0 -2
  88. package/lib/module/infraestructure/services/index.js.map +0 -1
  89. package/lib/typescript/index.d.ts +0 -219
  90. package/lib/typescript/index.d.ts.map +0 -1
  91. package/lib/typescript/infraestructure/index.d.ts +0 -3
  92. package/lib/typescript/infraestructure/index.d.ts.map +0 -1
  93. package/lib/typescript/infraestructure/interfaces/ibridgefy.d.ts +0 -10
  94. package/lib/typescript/infraestructure/interfaces/ibridgefy.d.ts.map +0 -1
  95. package/lib/typescript/infraestructure/interfaces/index.d.ts +0 -2
  96. package/lib/typescript/infraestructure/interfaces/index.d.ts.map +0 -1
  97. package/lib/typescript/infraestructure/services/bridgefy_service.d.ts +0 -17
  98. package/lib/typescript/infraestructure/services/bridgefy_service.d.ts.map +0 -1
  99. package/lib/typescript/infraestructure/services/index.d.ts +0 -2
  100. package/lib/typescript/infraestructure/services/index.d.ts.map +0 -1
  101. package/src/infraestructure/index.tsx +0 -2
  102. package/src/infraestructure/interfaces/ibridgefy.tsx +0 -10
  103. package/src/infraestructure/interfaces/index.tsx +0 -1
  104. package/src/infraestructure/services/bridgefy_service.tsx +0 -20
  105. package/src/infraestructure/services/index.tsx +0 -1
@@ -1,74 +1,51 @@
1
1
  buildscript {
2
- // Buildscript is evaluated before everything else so we can't use getExtOrDefault
3
- def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["BridgefyReactNative_kotlinVersion"]
2
+ ext.getExtOrDefault = {name ->
3
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['BridgefyReactNative_' + name]
4
+ }
4
5
 
6
+ rootProject.allprojects {
7
+ repositories {
8
+ maven {
9
+ url "https://maven.bridgefy.me/artifactory/libs-release-local"
10
+ }
11
+ }
12
+ }
5
13
  repositories {
6
14
  google()
7
15
  mavenCentral()
8
16
  }
9
17
 
10
18
  dependencies {
11
- classpath "com.android.tools.build:gradle:8.5.2"
19
+ classpath "com.android.tools.build:gradle:8.7.2"
12
20
  // noinspection DifferentKotlinGradleVersion
13
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
21
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
14
22
  }
15
23
  }
16
24
 
17
- rootProject.allprojects {
18
- repositories {
19
- maven {
20
- url "http://34.82.5.94:8081/artifactory/libs-release-local"
21
- allowInsecureProtocol = true
22
- }
23
- }
24
- }
25
-
26
- allprojects {
27
- repositories {
28
- google()
29
- mavenCentral()
30
- }
31
- }
32
-
33
- def isNewArchitectureEnabled() {
34
- return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
35
- }
36
25
 
37
26
  apply plugin: "com.android.library"
38
27
  apply plugin: "kotlin-android"
39
28
 
40
-
41
- def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
42
-
43
- if (isNewArchitectureEnabled()) {
44
- apply plugin: "com.facebook.react"
45
- }
46
-
47
- def getExtOrDefault(name) {
48
- return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["BridgefyReactNative_" + name]
49
- }
29
+ apply plugin: "com.facebook.react"
50
30
 
51
31
  def getExtOrIntegerDefault(name) {
52
32
  return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["BridgefyReactNative_" + name]).toInteger()
53
33
  }
54
34
 
55
35
  android {
56
- compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
57
-
58
- compileOptions {
59
- sourceCompatibility JavaVersion.VERSION_17
60
- targetCompatibility JavaVersion.VERSION_17
61
- }
36
+ namespace "me.bridgefy.plugin.react_native"
62
37
 
63
- kotlinOptions {
64
- jvmTarget = '17'
65
- }
38
+ compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
66
39
 
67
40
  defaultConfig {
68
41
  minSdkVersion getExtOrIntegerDefault("minSdkVersion")
69
42
  targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
70
- buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
71
43
  }
44
+
45
+ buildFeatures {
46
+ buildConfig true
47
+ }
48
+
72
49
  buildTypes {
73
50
  release {
74
51
  minifyEnabled false
@@ -78,6 +55,20 @@ android {
78
55
  lintOptions {
79
56
  disable "GradleCompatible"
80
57
  }
58
+
59
+ compileOptions {
60
+ sourceCompatibility JavaVersion.VERSION_1_8
61
+ targetCompatibility JavaVersion.VERSION_1_8
62
+ }
63
+
64
+ sourceSets {
65
+ main {
66
+ java.srcDirs += [
67
+ "generated/java",
68
+ "generated/jni"
69
+ ]
70
+ }
71
+ }
81
72
  }
82
73
 
83
74
  repositories {
@@ -88,20 +79,9 @@ repositories {
88
79
  def kotlin_version = getExtOrDefault("kotlinVersion")
89
80
 
90
81
  dependencies {
91
- implementation (group: "me.bridgefy", name: "android-sdk", version: "1.2.3", ext: "aar") {
82
+ implementation (group: "me.bridgefy", name: "android-sdk", version: "1.2.5", ext: "aar") {
92
83
  transitive = true
93
84
  }
94
- // For < 0.71, this will be from the local maven repo
95
- // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
96
- //noinspection GradleDynamicVersion
97
- implementation "com.facebook.react:react-native:+"
85
+ implementation "com.facebook.react:react-android"
98
86
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
99
87
  }
100
-
101
- if (isNewArchitectureEnabled()) {
102
- react {
103
- jsRootDir = file("../src/")
104
- libraryName = "BridgefyReactNative"
105
- codegenJavaPackageName = "me.bridgefy.plugin.react_native"
106
- }
107
- }
@@ -1,5 +1,5 @@
1
- BridgefyReactNative_kotlinVersion=2.0.20
2
- BridgefyReactNative_minSdkVersion=21
3
- BridgefyReactNative_targetSdkVersion=35
1
+ BridgefyReactNative_kotlinVersion=2.0.21
2
+ BridgefyReactNative_minSdkVersion=24
3
+ BridgefyReactNative_targetSdkVersion=34
4
4
  BridgefyReactNative_compileSdkVersion=35
5
- BridgefyReactNative_ndkversion=28.0.12916984
5
+ BridgefyReactNative_ndkVersion=27.1.12297006
@@ -1,12 +1,2 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
- xmlns:tools="http://schemas.android.com/tools"
3
- package="me.bridgefy.plugin.react_native">
4
- <uses-permission-sdk-23 android:name="android.permission.ACCESS_COARSE_LOCATION" android:maxSdkVersion="30" tools:node="replace" />
5
- <uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION" tools:node="replace" />
6
- <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" android:maxSdkVersion="30" />
7
- <uses-permission android:name="android.permission.BLUETOOTH" />
8
- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
9
- <uses-permission android:name="android.permission.BLUETOOTH_SCAN" tools:node="replace" />
10
- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
11
- <uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
12
2
  </manifest>