@blueid/access-capacitor 1.18.0 → 1.19.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.
- package/ios/CBlueIDAccess.xcframework/Info.plist +6 -6
- package/ios/CBlueIDAccess.xcframework/ios-arm64/libCBlueIDAccess.a +0 -0
- package/ios/CBlueIDAccess.xcframework/ios-arm64_x86_64-simulator/libCBlueIDAccess.a +0 -0
- package/ios/CBlueIDAccess.xcframework/macos-arm64_x86_64/libCBlueIDAccess.a +0 -0
- package/ios/Plugin/BlueIDAccessSDK/BlueAppDelegate.swift +3 -0
- package/ios/Plugin/BlueIDAccessSDK/BlueBluetooth.swift +21 -0
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<key>HeadersPath</key>
|
|
11
11
|
<string>Headers</string>
|
|
12
12
|
<key>LibraryIdentifier</key>
|
|
13
|
-
<string>
|
|
13
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
14
14
|
<key>LibraryPath</key>
|
|
15
15
|
<string>libCBlueIDAccess.a</string>
|
|
16
16
|
<key>SupportedArchitectures</key>
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
<string>x86_64</string>
|
|
20
20
|
</array>
|
|
21
21
|
<key>SupportedPlatform</key>
|
|
22
|
-
<string>
|
|
22
|
+
<string>ios</string>
|
|
23
|
+
<key>SupportedPlatformVariant</key>
|
|
24
|
+
<string>simulator</string>
|
|
23
25
|
</dict>
|
|
24
26
|
<dict>
|
|
25
27
|
<key>BinaryPath</key>
|
|
@@ -43,7 +45,7 @@
|
|
|
43
45
|
<key>HeadersPath</key>
|
|
44
46
|
<string>Headers</string>
|
|
45
47
|
<key>LibraryIdentifier</key>
|
|
46
|
-
<string>
|
|
48
|
+
<string>macos-arm64_x86_64</string>
|
|
47
49
|
<key>LibraryPath</key>
|
|
48
50
|
<string>libCBlueIDAccess.a</string>
|
|
49
51
|
<key>SupportedArchitectures</key>
|
|
@@ -52,9 +54,7 @@
|
|
|
52
54
|
<string>x86_64</string>
|
|
53
55
|
</array>
|
|
54
56
|
<key>SupportedPlatform</key>
|
|
55
|
-
<string>
|
|
56
|
-
<key>SupportedPlatformVariant</key>
|
|
57
|
-
<string>simulator</string>
|
|
57
|
+
<string>macos</string>
|
|
58
58
|
</dict>
|
|
59
59
|
</array>
|
|
60
60
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -38,10 +38,13 @@ public final class BlueAppDelegate: NSObject {
|
|
|
38
38
|
#endif
|
|
39
39
|
|
|
40
40
|
@objc public static func willResignActive() {
|
|
41
|
+
blueBluetoothAppWillResignActive()
|
|
41
42
|
BlueAccessSyncScheduler.shared.willResignActive()
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
@objc public static func didBecomeActive() {
|
|
46
|
+
blueBluetoothAppDidBecomeActive()
|
|
47
|
+
|
|
45
48
|
#if os(iOS) || os(watchOS)
|
|
46
49
|
blueNearbyAppBecameActive()
|
|
47
50
|
#endif
|
|
@@ -5,6 +5,7 @@ import CBlueIDAccess
|
|
|
5
5
|
internal let blueServiceUUID = CBUUID(string: String(format: "%04X", BLUE_BLE_SERVICE_UUID))
|
|
6
6
|
|
|
7
7
|
private var blueBluetoothIsActive = false
|
|
8
|
+
private var blueBluetoothSavedState = false
|
|
8
9
|
private var blueCentralManager: CBCentralManager? = nil
|
|
9
10
|
private var blueCentralManagerListener: BlueCentralManagerListener? = nil
|
|
10
11
|
|
|
@@ -294,3 +295,23 @@ public struct BlueCheckBluetoothPermissionCommand: BlueCommand {
|
|
|
294
295
|
return "notDetermined"
|
|
295
296
|
}
|
|
296
297
|
}
|
|
298
|
+
|
|
299
|
+
internal func blueBluetoothAppDidBecomeActive() {
|
|
300
|
+
do {
|
|
301
|
+
if (blueBluetoothSavedState) {
|
|
302
|
+
try blueCommands.bluetoothActivate.run()
|
|
303
|
+
}
|
|
304
|
+
} catch {
|
|
305
|
+
blueLogError(error.localizedDescription)
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
internal func blueBluetoothAppWillResignActive() {
|
|
310
|
+
do {
|
|
311
|
+
blueBluetoothSavedState = blueBluetoothIsActive
|
|
312
|
+
|
|
313
|
+
try blueCommands.bluetoothDeactivate.run()
|
|
314
|
+
} catch {
|
|
315
|
+
blueLogError(error.localizedDescription)
|
|
316
|
+
}
|
|
317
|
+
}
|