react-native-mytatva-rn-sdk 1.2.61 → 1.2.62

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.
@@ -90,6 +90,7 @@
90
90
  case CBManagerStateResetting:
91
91
  case CBManagerStateUnsupported:
92
92
  KLTLog(@"该设备不支持蓝牙,请更换设备");
93
+ [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"bluetoothOff"];
93
94
  [Notification_Center postNotificationName:@"BluetoothEnable" object:@(NO)];
94
95
  break;
95
96
  case CBManagerStateUnauthorized:
@@ -101,10 +102,12 @@
101
102
  self.connectedPeripheral = nil;
102
103
  [self.peripherals removeAllObjects];
103
104
  }
105
+ [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"bluetoothOff"];
104
106
  [Notification_Center postNotificationName:@"BluetoothEnable" object:@(NO)];
105
107
  }
106
108
  break;
107
109
  case CBManagerStatePoweredOn: {
110
+ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"bluetoothOff"];
108
111
  [Notification_Center postNotificationName:@"BluetoothEnable" object:@(YES)];
109
112
  }
110
113
  break;
@@ -133,6 +133,8 @@ import Foundation
133
133
  let bluetoothOff = UserDefaults.standard.bool(forKey: "bluetoothOff")
134
134
  if bluetoothOff == false {
135
135
  viewModel.debouncer.update(with: .transmitterDisconnect)
136
+ } else {
137
+ viewModel.debouncer.update(with: .bluetoothOff)
136
138
  }
137
139
 
138
140
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-mytatva-rn-sdk",
3
- "version": "1.2.61",
3
+ "version": "1.2.62",
4
4
  "description": "a package to inject data into visit health pwa",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",