react-native-gizwits-sdk-v5 1.5.0-beta.9 → 1.5.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.
@@ -64,11 +64,13 @@ dependencies {
64
64
  implementation "androidx.startup:startup-runtime:$startup_version"
65
65
 
66
66
  implementation 'com.github.wendykierp:JTransforms:3.1'
67
+ // ESPTouch
68
+ implementation 'com.github.EspressifApp:lib-esptouch-android:1.1.1'
67
69
 
68
- implementation("io.github.gizwits:sdk:1.3.7")
69
- implementation("io.github.gizwits:sdk-bluetooth:1.3.7")
70
- implementation("io.github.gizwits:sdk-lan:1.3.7")
71
- implementation("io.github.gizwits:sdk-mqtt:1.3.7")
70
+ implementation("io.github.gizwits:sdk:1.4.2")
71
+ implementation("io.github.gizwits:sdk-bluetooth:1.4.2")
72
+ implementation("io.github.gizwits:sdk-lan:1.4.2")
73
+ implementation("io.github.gizwits:sdk-mqtt:1.4.2")
72
74
  // implementation files('libs/sdk-release.aar', 'libs/sdk-bluetooth-release.aar', 'libs/sdk-lan-release.aar', 'libs/sdk-mqtt-release.aar')
73
75
  implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutine_version")
74
76
  // retrofit
@@ -28,6 +28,7 @@ import com.google.gson.annotations.SerializedName
28
28
  import kotlinx.coroutines.CoroutineScope
29
29
  import kotlinx.coroutines.Dispatchers
30
30
  import kotlinx.coroutines.SupervisorJob
31
+ import kotlinx.coroutines.cancel
31
32
  import kotlinx.coroutines.launch
32
33
  import org.json.JSONArray
33
34
  import org.json.JSONObject
@@ -129,7 +130,9 @@ data class GizProvideWiFiCredentialsWithAirLinkParams(
129
130
  val timeout: Long,
130
131
  @SerializedName("productKeys")
131
132
  val productKeys: List<String>,
132
- ): DeviceParams
133
+ ): DeviceParams {
134
+ override val id: String = "airlink" // AirLink 配网不需要设备ID
135
+ }
133
136
 
134
137
  data class GizStopProvideWiFiCredentialsParams(
135
138
  @SerializedName("id")
@@ -300,7 +303,7 @@ class RNGizDeviceManagerModule(reactContext: ReactApplicationContext) : ReactCon
300
303
  }
301
304
 
302
305
  @ReactMethod
303
- fun stopProvideWiFiCredentialsWithAirLink(options: ReadableMap, result: Callback) {
306
+ fun stopProvideWiFiCredentialsWithAirLink(result: Callback) {
304
307
  moduleScope.launch {
305
308
  val res = GizESPTouchSmartConfig.stopProvideWiFiCredentialsWithAirLink()
306
309
  GizRNCallbackManager.callbackWithResult(callback = result, result = res)
@@ -24,7 +24,7 @@ RCT_EXTERN_METHOD(unBind:(NSDictionary *)options result:(RCTResponseSenderBlock)
24
24
  RCT_EXTERN_METHOD(stopProvideWiFiCredentials:(NSDictionary *)options result:(RCTResponseSenderBlock)result)
25
25
  RCT_EXTERN_METHOD(provideWiFiCredentials:(NSDictionary *)options result:(RCTResponseSenderBlock)result)
26
26
  RCT_EXTERN_METHOD(provideWiFiCredentialsWithAirLink:(NSDictionary *)options result:(RCTResponseSenderBlock)result)
27
- RCT_EXTERN_METHOD(stopProvideWiFiCredentialsWithAirLink:(NSDictionary *)options result:(RCTResponseSenderBlock)result)
27
+ RCT_EXTERN_METHOD(stopProvideWiFiCredentialsWithAirLink:(RCTResponseSenderBlock)result)
28
28
 
29
29
  RCT_EXTERN_METHOD(startMusicalRhythm:(NSDictionary *)options result:(RCTResponseSenderBlock)result)
30
30
  RCT_EXTERN_METHOD(stopMusicalRhythm:(NSDictionary *)options result:(RCTResponseSenderBlock)result)
@@ -472,7 +472,7 @@ class RNGizDeviceManagerModule: RCTEventEmitter {
472
472
  }
473
473
 
474
474
  @objc
475
- public func stopProvideWiFiCredentialsWithAirLink(_ options: NSDictionary, result: @escaping RCTResponseSenderBlock) {
475
+ public func stopProvideWiFiCredentialsWithAirLink(_ result: @escaping RCTResponseSenderBlock) {
476
476
  Task {
477
477
  var data: GizResult<Int?, GizActivatorException?>
478
478
  data = await ESPTouchSmartConfig.sharedInstance.stopProvideWiFiCredentialsWithAirLink()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-gizwits-sdk-v5",
3
- "version": "1.5.0-beta.9",
3
+ "version": "1.5.0",
4
4
  "description": "Gizwits",
5
5
  "homepage": "https://github.com/demchenkoalex/react-native-gizwits-sdk-v5#readme",
6
6
  "main": "lib/index.js",
@@ -19,6 +19,6 @@ Pod::Spec.new do |s|
19
19
 
20
20
  s.dependency 'React'
21
21
  s.dependency 'CryptoSwift', '~> 1.8.0'
22
- s.dependency 'GizwitsiOSSDK', '~> 1.8.1'
22
+ s.dependency 'GizwitsiOSSDK', '~> 2.0.7'
23
23
 
24
24
  end