@doorstepai/dropoff-sdk 2.2.0 → 2.2.3
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/README.md +265 -112
- package/android/build.gradle +5 -1
- package/android/src/main/java/com/doorstepai/dropoffsdk/DoorstepAIModule.kt +368 -136
- package/ios/DoorstepAI.mm +8 -1
- package/ios/DoorstepAI.swift +120 -139
- package/ios/DoorstepDropoffSDK.xcframework/Info.plist +5 -5
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/DoorstepDropoffSDK +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.abi.json +10176 -6209
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +82 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.swiftinterface +82 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +10 -10
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/DWARF/DoorstepDropoffSDK +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/DoorstepDropoffSDK.yml +3867 -3248
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/DoorstepDropoffSDK +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +10176 -6209
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +82 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +82 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +10176 -6209
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +82 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +82 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +20 -20
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/DWARF/DoorstepDropoffSDK +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/DoorstepDropoffSDK.yml +3868 -3248
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/DoorstepDropoffSDK.yml +3836 -3233
- package/lib/module/DoorstepAI.js +306 -71
- package/lib/module/DoorstepAI.js.map +1 -1
- package/lib/module/RootDoorstepAI.js +50 -32
- package/lib/module/RootDoorstepAI.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/DoorstepAI.d.ts +271 -73
- package/lib/typescript/src/DoorstepAI.d.ts.map +1 -1
- package/lib/typescript/src/RootDoorstepAI.d.ts +24 -7
- package/lib/typescript/src/RootDoorstepAI.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/DoorstepAI.tsx +425 -91
- package/src/RootDoorstepAI.tsx +75 -45
- package/src/index.tsx +6 -0
package/ios/DoorstepAI.mm
CHANGED
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
@interface RCT_EXTERN_MODULE(DoorstepAI, RCTEventEmitter)
|
|
5
5
|
|
|
6
6
|
RCT_EXTERN_METHOD(setApiKey:(nonnull NSString *)apiKey)
|
|
7
|
-
RCT_EXTERN_METHOD(
|
|
7
|
+
RCT_EXTERN_METHOD(setDoorstepGoApiKey:(nonnull NSString *)apiKey)
|
|
8
|
+
RCT_EXTERN_METHOD(debugStateJson:(RCTPromiseResolveBlock)resolve
|
|
9
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
10
|
+
RCT_EXTERN_METHOD(checkPermissions:(nullable NSArray *)permissions
|
|
11
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
12
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
13
|
+
RCT_EXTERN_METHOD(checkPermissionsJson:(nullable NSArray *)permissions
|
|
14
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
8
15
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
9
16
|
RCT_EXTERN_METHOD(requestPermissions:(nullable NSDictionary *)options
|
|
10
17
|
resolver:(RCTPromiseResolveBlock)resolve
|
package/ios/DoorstepAI.swift
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import Foundation
|
|
2
2
|
import React
|
|
3
|
-
import CoreBluetooth
|
|
4
|
-
import CoreLocation
|
|
5
|
-
import CoreMotion
|
|
6
3
|
import DoorstepDropoffSDK
|
|
7
4
|
|
|
5
|
+
// Deliberately does NOT import CoreBluetooth / CoreLocation / CoreMotion. This
|
|
6
|
+
// bridge reads no permission state of its own — the SDK's PermissionEngine owns
|
|
7
|
+
// every status read and every prompt — and not importing the frameworks is the
|
|
8
|
+
// cheapest guarantee that a future edit cannot casually instantiate a
|
|
9
|
+
// `CBCentralManager` (which prompts, and aborts a host with no
|
|
10
|
+
// NSBluetoothAlwaysUsageDescription) or a second `CLLocationManager`.
|
|
11
|
+
|
|
8
12
|
@objc(DoorstepAI)
|
|
9
13
|
class DoorstepAIBridge: RCTEventEmitter {
|
|
10
14
|
@objc
|
|
@@ -63,176 +67,153 @@ class DoorstepAIBridge: RCTEventEmitter {
|
|
|
63
67
|
DoorstepAI.setApiKey(key: apiKey)
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
// things, and only the first belongs in a wrapper. Everything below reads the
|
|
70
|
-
// platform's own status APIs — all three are non-prompting — and dispatches the
|
|
71
|
-
// actual request to the native SDK, which keeps the permission list, the flags
|
|
72
|
-
// and the ordering. In particular this file must never instantiate a
|
|
73
|
-
// `CBCentralManager`: doing so PROMPTS, and it hard-crashes a host that has no
|
|
74
|
-
// `NSBluetoothAlwaysUsageDescription`. That is exactly why a wrapper-owned
|
|
75
|
-
// central manager was deleted, and why the SDK's own `MetadataCollector` reads
|
|
76
|
-
// the static `CBManager.authorization` instead.
|
|
77
|
-
|
|
78
|
-
/// How long `requestPermissions` waits for the user to answer before giving up
|
|
79
|
-
/// and resolving with the state as it stands.
|
|
80
|
-
private static let permissionAnswerTimeout: TimeInterval = 120
|
|
81
|
-
private static let permissionPollInterval: TimeInterval = 0.25
|
|
82
|
-
|
|
83
|
-
/// Main-thread confined. Guards against a second `requestPermissions` racing a
|
|
84
|
-
/// prompt sequence that is still on screen.
|
|
85
|
-
private static var permissionRequestInFlight = false
|
|
86
|
-
|
|
87
|
-
/// The instance `authorizationStatus` (FP2 6b — the deprecated class method is a
|
|
88
|
-
/// different, process-cached value from the one the SDK's own location code
|
|
89
|
-
/// trusts). Instantiating a `CLLocationManager` never prompts; only
|
|
90
|
-
/// `request*Authorization` does. The probe is local and unretained, so this file
|
|
91
|
-
/// owns no location manager.
|
|
92
|
-
private static func locationState() -> PermissionState {
|
|
93
|
-
let status: CLAuthorizationStatus
|
|
94
|
-
if #available(iOS 14.0, *) {
|
|
95
|
-
status = CLLocationManager().authorizationStatus
|
|
96
|
-
} else {
|
|
97
|
-
status = CLLocationManager.authorizationStatus()
|
|
98
|
-
}
|
|
99
|
-
switch status {
|
|
100
|
-
case .authorizedAlways, .authorizedWhenInUse: return .granted
|
|
101
|
-
case .denied, .restricted: return .denied
|
|
102
|
-
default: return .prompt
|
|
103
|
-
}
|
|
70
|
+
@objc
|
|
71
|
+
func setDoorstepGoApiKey(_ apiKey: String) {
|
|
72
|
+
DoorstepAI.setDoorstepGoApiKey(key: apiKey)
|
|
104
73
|
}
|
|
105
74
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
default: return .prompt
|
|
111
|
-
}
|
|
75
|
+
@objc
|
|
76
|
+
func debugStateJson(_ resolve: @escaping RCTPromiseResolveBlock,
|
|
77
|
+
rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
78
|
+
resolve(DoorstepAI.debugStateJson())
|
|
112
79
|
}
|
|
113
80
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
81
|
+
// MARK: - Permissions
|
|
82
|
+
//
|
|
83
|
+
// Pass-throughs to the SDK's whitelist permission API. The SDK owns the
|
|
84
|
+
// buckets, the eight-state vocabulary, the prompt order and the "what will I
|
|
85
|
+
// decline to ask, and why" planning; this file only translates names across the
|
|
86
|
+
// bridge. What USED to live here — a hand-rolled CLLocationManager /
|
|
87
|
+
// CMMotionActivityManager / CBManager reader plus a 0.25 s polling loop to
|
|
88
|
+
// guess when a prompt had been answered — was a second implementation of the
|
|
89
|
+
// same policy, and a second implementation is a second set of states to drift
|
|
90
|
+
// apart. `PermissionEngine` already sequences one prompt at a time, awaits each
|
|
91
|
+
// answer against its PRE-prompt state, refuses to interleave two request
|
|
92
|
+
// sequences, and honours the caller's timeout.
|
|
93
|
+
//
|
|
94
|
+
// The one rule this file must still respect: never instantiate a
|
|
95
|
+
// `CBCentralManager`. Doing so PROMPTS, and it hard-crashes a host with no
|
|
96
|
+
// `NSBluetoothAlwaysUsageDescription`. Bluetooth state is read by the SDK from
|
|
97
|
+
// the static `CBManager.authorization`.
|
|
98
|
+
|
|
99
|
+
/// Legacy three-key view of the eight-state buckets, so hosts written against
|
|
100
|
+
/// the published 2.x wrapper API keep working. `location` is the When-In-Use
|
|
101
|
+
/// bucket (an Always-vs-When-In-Use distinction cannot survive three values —
|
|
102
|
+
/// that is what `statuses.locationAlways` is for).
|
|
103
|
+
private static func legacyPermissionsView(
|
|
104
|
+
_ statuses: [DoorstepPermission: DoorstepPermissionStatus]
|
|
105
|
+
) -> [String: String] {
|
|
106
|
+
func collapse(_ permission: DoorstepPermission) -> String {
|
|
107
|
+
guard let state = statuses[permission]?.state else { return "prompt" }
|
|
108
|
+
switch state {
|
|
109
|
+
case .granted, .whenInUseOnly, .unavailable: return "granted"
|
|
110
|
+
case .notDetermined: return "prompt"
|
|
111
|
+
case .denied, .permanentlyDenied, .restricted, .notDeclared: return "denied"
|
|
121
112
|
}
|
|
122
113
|
}
|
|
123
|
-
return
|
|
114
|
+
return [
|
|
115
|
+
"location": collapse(.locationWhenInUse),
|
|
116
|
+
"motion": collapse(.motionFitness),
|
|
117
|
+
"bluetooth": collapse(.bluetooth),
|
|
118
|
+
]
|
|
124
119
|
}
|
|
125
120
|
|
|
126
|
-
private
|
|
127
|
-
|
|
121
|
+
private static func serialize(
|
|
122
|
+
_ statuses: [DoorstepPermission: DoorstepPermissionStatus]
|
|
123
|
+
) -> [String: Any] {
|
|
124
|
+
var out: [String: Any] = [:]
|
|
125
|
+
for (permission, status) in statuses {
|
|
126
|
+
out[permission.rawValue] = [
|
|
127
|
+
"permission": permission.rawValue,
|
|
128
|
+
"state": status.state.rawValue,
|
|
129
|
+
"osStatus": status.osStatus,
|
|
130
|
+
"canRequest": status.canRequest,
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
return out
|
|
128
134
|
}
|
|
129
135
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
136
|
+
/// `nil` / an absent array means "no whitelist" — every bucket. An EMPTY array
|
|
137
|
+
/// is not the same thing and must stay empty: it means the caller narrowed the
|
|
138
|
+
/// whitelist down to nothing this platform has, and turning that into "ask for
|
|
139
|
+
/// everything" would be the opposite of what they asked for.
|
|
140
|
+
private static func parseWhitelist(_ raw: Any?) -> [DoorstepPermission] {
|
|
141
|
+
guard let names = raw as? [String] else { return DoorstepPermission.all }
|
|
142
|
+
return names.compactMap { DoorstepPermission.from(wireName: $0) }
|
|
137
143
|
}
|
|
138
144
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
private static func statusPayload(
|
|
146
|
+
_ statuses: [DoorstepPermission: DoorstepPermissionStatus]
|
|
147
|
+
) -> [String: Any] {
|
|
142
148
|
return [
|
|
143
|
-
"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"bluetooth": bluetoothState().rawValue,
|
|
147
|
-
]
|
|
149
|
+
"statuses": serialize(statuses),
|
|
150
|
+
"permissions": legacyPermissionsView(statuses),
|
|
151
|
+
"unsupported": [String](),
|
|
148
152
|
]
|
|
149
153
|
}
|
|
150
154
|
|
|
151
155
|
@objc
|
|
152
|
-
func checkPermissions(_
|
|
156
|
+
func checkPermissions(_ permissions: NSArray?,
|
|
157
|
+
resolver resolve: @escaping RCTPromiseResolveBlock,
|
|
153
158
|
rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
154
|
-
// Main queue
|
|
159
|
+
// Main queue: `checkPermissions` is @MainActor (CLLocationManager is
|
|
160
|
+
// main-thread affine), and @ReactMethod bodies run off the main thread.
|
|
155
161
|
DispatchQueue.main.async {
|
|
156
|
-
|
|
162
|
+
let whitelist = DoorstepAIBridge.parseWhitelist(permissions)
|
|
163
|
+
resolve(DoorstepAIBridge.statusPayload(DoorstepAI.checkPermissions(whitelist)))
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@objc
|
|
168
|
+
func checkPermissionsJson(_ permissions: NSArray?,
|
|
169
|
+
resolver resolve: @escaping RCTPromiseResolveBlock,
|
|
170
|
+
rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
171
|
+
DispatchQueue.main.async {
|
|
172
|
+
let whitelist = DoorstepAIBridge.parseWhitelist(permissions)
|
|
173
|
+
resolve(DoorstepAI.checkPermissionsJson(whitelist))
|
|
157
174
|
}
|
|
158
175
|
}
|
|
159
176
|
|
|
160
177
|
/// iOS half of the cross-platform requester.
|
|
161
178
|
///
|
|
162
|
-
/// `options.permissions`
|
|
163
|
-
///
|
|
164
|
-
///
|
|
165
|
-
///
|
|
166
|
-
///
|
|
167
|
-
///
|
|
168
|
-
/// stops a launch-time call re-escalating a user's "While Using the App" choice.
|
|
179
|
+
/// `options.permissions` is the whitelist and it is honoured exactly: absent
|
|
180
|
+
/// (or null) requests every bucket, an array requests only those buckets.
|
|
181
|
+
/// `onlyIfNotDetermined` and `timeoutSeconds` are left at the SDK's defaults
|
|
182
|
+
/// when not supplied — `onlyIfNotDetermined: true` especially, because it is
|
|
183
|
+
/// what stops a launch-time call from re-escalating a user's deliberate
|
|
184
|
+
/// "While Using the App" choice (FP2 7a).
|
|
169
185
|
///
|
|
170
|
-
/// Resolves
|
|
171
|
-
///
|
|
172
|
-
///
|
|
173
|
-
/// that will actually be raised has settled out of `.notDetermined`. The pending
|
|
174
|
-
/// set mirrors native's own gates (`onlyIfNotDetermined` for location,
|
|
175
|
-
/// `isActivityAvailable()` for motion, the `NSBluetoothAlwaysUsageDescription`
|
|
176
|
-
/// check for Bluetooth) so the wait cannot hang on a prompt native never shows.
|
|
186
|
+
/// Resolves once the SDK's completion fires, which is after the prompt sequence
|
|
187
|
+
/// has settled — including the in-flight refusal, which comes back as every
|
|
188
|
+
/// bucket `deferred` rather than as a hung promise.
|
|
177
189
|
@objc
|
|
178
190
|
func requestPermissions(_ options: NSDictionary?,
|
|
179
191
|
resolver resolve: @escaping RCTPromiseResolveBlock,
|
|
180
192
|
rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
181
|
-
let
|
|
193
|
+
let whitelist = DoorstepAIBridge.parseWhitelist(options?["permissions"])
|
|
194
|
+
let onlyIfNotDetermined = (options?["onlyIfNotDetermined"] as? NSNumber)?.boolValue ?? true
|
|
195
|
+
let timeout = (options?["timeoutSeconds"] as? NSNumber)?.doubleValue ?? 120
|
|
182
196
|
DispatchQueue.main.async {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
pending.insert("motion")
|
|
200
|
-
}
|
|
201
|
-
if requestBluetooth,
|
|
202
|
-
DoorstepAIBridge.bluetoothState() == .prompt,
|
|
203
|
-
Bundle.main.object(forInfoDictionaryKey: "NSBluetoothAlwaysUsageDescription") != nil {
|
|
204
|
-
pending.insert("bluetooth")
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
DoorstepAI.requestAllPermissions(requestBluetooth: requestBluetooth)
|
|
208
|
-
|
|
209
|
-
DoorstepAIBridge.awaitPermissionAnswers(
|
|
210
|
-
pending: pending,
|
|
211
|
-
deadline: Date().addingTimeInterval(DoorstepAIBridge.permissionAnswerTimeout)
|
|
212
|
-
) {
|
|
213
|
-
DoorstepAIBridge.permissionRequestInFlight = false
|
|
214
|
-
resolve(DoorstepAIBridge.permissionStatusPayload())
|
|
197
|
+
DoorstepAI.requestPermissions(
|
|
198
|
+
whitelist,
|
|
199
|
+
onlyIfNotDetermined: onlyIfNotDetermined,
|
|
200
|
+
timeout: timeout
|
|
201
|
+
) { result in
|
|
202
|
+
var payload = DoorstepAIBridge.statusPayload(result.statuses)
|
|
203
|
+
payload["requested"] = result.requested.map { $0.rawValue }
|
|
204
|
+
payload["alreadyDetermined"] = result.alreadyDetermined.map { $0.rawValue }
|
|
205
|
+
payload["unavailable"] = result.unavailable.map { $0.rawValue }
|
|
206
|
+
payload["didRequest"] = result.didRequest
|
|
207
|
+
var deferred: [String: String] = [:]
|
|
208
|
+
for (permission, reason) in result.deferred {
|
|
209
|
+
deferred[permission.rawValue] = reason
|
|
210
|
+
}
|
|
211
|
+
payload["deferred"] = deferred
|
|
212
|
+
resolve(payload)
|
|
215
213
|
}
|
|
216
214
|
}
|
|
217
215
|
}
|
|
218
216
|
|
|
219
|
-
/// Polls the non-prompting status APIs on the main queue until nothing is left
|
|
220
|
-
/// `.notDetermined` or the deadline passes. Polling rather than a delegate is
|
|
221
|
-
/// deliberate: observing a `CLLocationManager` authorization change would mean
|
|
222
|
-
/// owning one, which is the wrapper-owned-manager pattern this surface removes.
|
|
223
|
-
private static func awaitPermissionAnswers(pending: Set<String>,
|
|
224
|
-
deadline: Date,
|
|
225
|
-
completion: @escaping () -> Void) {
|
|
226
|
-
let unanswered = pending.filter { state(for: $0) == .prompt }
|
|
227
|
-
if unanswered.isEmpty || Date() >= deadline {
|
|
228
|
-
completion()
|
|
229
|
-
return
|
|
230
|
-
}
|
|
231
|
-
DispatchQueue.main.asyncAfter(deadline: .now() + permissionPollInterval) {
|
|
232
|
-
awaitPermissionAnswers(pending: unanswered, deadline: deadline, completion: completion)
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
217
|
@objc
|
|
237
218
|
func configureRemoteLogging(_ enabled: Bool,
|
|
238
219
|
minLevel: Any?,
|
|
@@ -10,18 +10,15 @@
|
|
|
10
10
|
<key>DebugSymbolsPath</key>
|
|
11
11
|
<string>dSYMs</string>
|
|
12
12
|
<key>LibraryIdentifier</key>
|
|
13
|
-
<string>ios-
|
|
13
|
+
<string>ios-arm64</string>
|
|
14
14
|
<key>LibraryPath</key>
|
|
15
15
|
<string>DoorstepDropoffSDK.framework</string>
|
|
16
16
|
<key>SupportedArchitectures</key>
|
|
17
17
|
<array>
|
|
18
18
|
<string>arm64</string>
|
|
19
|
-
<string>x86_64</string>
|
|
20
19
|
</array>
|
|
21
20
|
<key>SupportedPlatform</key>
|
|
22
21
|
<string>ios</string>
|
|
23
|
-
<key>SupportedPlatformVariant</key>
|
|
24
|
-
<string>simulator</string>
|
|
25
22
|
</dict>
|
|
26
23
|
<dict>
|
|
27
24
|
<key>BinaryPath</key>
|
|
@@ -29,15 +26,18 @@
|
|
|
29
26
|
<key>DebugSymbolsPath</key>
|
|
30
27
|
<string>dSYMs</string>
|
|
31
28
|
<key>LibraryIdentifier</key>
|
|
32
|
-
<string>ios-
|
|
29
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
33
30
|
<key>LibraryPath</key>
|
|
34
31
|
<string>DoorstepDropoffSDK.framework</string>
|
|
35
32
|
<key>SupportedArchitectures</key>
|
|
36
33
|
<array>
|
|
37
34
|
<string>arm64</string>
|
|
35
|
+
<string>x86_64</string>
|
|
38
36
|
</array>
|
|
39
37
|
<key>SupportedPlatform</key>
|
|
40
38
|
<string>ios</string>
|
|
39
|
+
<key>SupportedPlatformVariant</key>
|
|
40
|
+
<string>simulator</string>
|
|
41
41
|
</dict>
|
|
42
42
|
</array>
|
|
43
43
|
<key>CFBundlePackageType</key>
|