You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/capability-guides/mobile-access/mobile-device-sdks/handling-system-permissions.md
+5-11Lines changed: 5 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,23 +2,17 @@
2
2
3
3
Missing or required system permissions (Bluetooth, internet connectivity, etc.) are surfaced as `CredentialError.userInteractionRequired(action)` entries on each credential’s `errors` array. Observe these errors after activation and handle the specified actions. Errors are automatically updated to reflect current requirements.
4
4
5
-
```swift
6
-
importSeamSDK
7
-
importCombine
8
-
9
-
privatevar permissionCancellable: AnyCancellable?
10
-
```
11
-
12
5
## Monitoring Permission Errors
13
6
14
-
Use Combine to watch the published credentials array and handle permission-related errors:
15
-
16
7
{% tabs %}
17
8
{% tab title="iOS Swift" %}
18
9
10
+
Use Combine to watch the published credentials array and handle permission-related errors:
Copy file name to clipboardExpand all lines: docs/capability-guides/mobile-access/mobile-device-sdks/initializing-the-seam-mobile-sdk.md
+19-20Lines changed: 19 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ dependencies {
37
37
38
38
{% tab title="iOS Swift" %}
39
39
You can install SeamSDK via CocoaPods or Swift Package Manager (SPM).
40
-
SeamSDK supports per-lock-provider integration granularity--include only the modules you need to keep your app footprint minimal.
40
+
SeamSDK supports per-lock-provider integration granularity--include only the modules you need to minimize your app's footprint.
41
41
42
42
{% code title="Podfile" %}
43
43
```ruby
@@ -86,7 +86,7 @@ See the [device or system integration guide](../../../device-and-system-integrat
86
86
87
87
### iOS Requirement
88
88
89
-
To prevent Apple Wallet from appearing while scanning for Bluetooth low energy (BLE) or similar locks, request the `com.apple.developer.passkit.pass-presentation-suppression` entitlement for your app from the Apple Developer portal.
89
+
While not required, you can optionally request the `com.apple.developer.passkit.pass-presentation-suppression` entitlement from the Apple Developer portal. This entitlement prevents Apple Wallet from appearing when scanning for Bluetooth low energy (BLE) or similar locks, improving the unlock experience.
## 4. Initialize the Mobile SDK with the Client Session Token
207
207
208
208
209
-
Use the client session token you generated earlier to bootstrap the Seam SDK on the device. Under the hood, this will set up credential synchronization and start a background sync loop to keep permissions up to date.
209
+
Use the client session token you generated earlier to bootstrap the Seam SDK on the device. Under the hood, this will set up credential synchronization and start a background sync loop to keep credentials up to date.
210
210
211
211
212
212
### Initialization and Error Handling
@@ -247,16 +247,13 @@ import SeamSDK
247
247
Task {
248
248
do {
249
249
// Bootstrap the SDK with the CST from your login flow
Copy file name to clipboardExpand all lines: docs/capability-guides/mobile-access/mobile-device-sdks/using-unlock-with-tap.md
+27-35Lines changed: 27 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,30 +5,30 @@ description: >-
5
5
6
6
# Unlocking
7
7
8
-
Unlocking with SeamSDK uses proximity to communicate credentials to door readers. When a user initiates an unlock, the SDK performs scanning, error handling, and unlock events via `SeamSDKManager.shared.unlock(using:)`.
8
+
Unlocking with SeamSDK uses proximity to communicate credentials to door readers. When a user initiates an unlock, the SDK performs scanning, error handling, and unlock events via `Seam.shared.unlock(using:)`.
9
9
10
10
Using this process involves the following steps:
11
11
12
12
1. Retrieve available mobile credentials.
13
-
2. Monitor for permission or credential errors unhandled errors will be thrown as `credentialErrors([SeamSDKCredentialError])`
13
+
2. Monitor for permission or credential errors unhandled errors will be thrown as `credentialErrors([SeamCredentialError])`
14
14
3. Perform the unlock operation.
15
15
4. Handle unlock status events.
16
-
5. Cancel the unlock operation when needed.
16
+
5. Cancel the unlock operation if needed.
17
17
18
18
***
19
19
20
20
## 1. Retrieve Mobile Credentials
21
21
22
-
Access the current credentials via the published `credentials` array on `SeamSDKManager.shared`:
22
+
Access the current credentials via the published `credentials` array on `Seam.shared`:
23
23
24
24
{% tabs %}
25
25
{% tab title="iOS Swift" %}
26
26
```swift
27
27
// Access credentials
28
-
let credentials =SeamSDKManager.shared.credentials
28
+
let credentials =Seam.shared.credentials
29
29
30
30
// Observe updates with Combine
31
-
let credentialsSubscription =SeamSDKManager.shared.$credentials
31
+
let credentialsSubscription =Seam.shared.$credentials
32
32
.sink { creds in
33
33
// Update UI with new credentials array
34
34
}
@@ -43,7 +43,7 @@ Permission or setup issues appear in each credential’s `errors` property. Obse
43
43
{% tabs %}
44
44
{% tab title="iOS Swift" %}
45
45
```swift
46
-
let errorSubscription =SeamSDKManager.shared.$credentials
46
+
let errorSubscription =Seam.shared.$credentials
47
47
.flatMap { creds in creds.publisher }
48
48
.map { $0.errors }
49
49
.sink { errors in
@@ -53,30 +53,31 @@ let errorSubscription = SeamSDKManager.shared.$credentials
53
53
{% endtab %}
54
54
{% endtabs %}
55
55
56
-
> **Note:** The `.errors` array on credentials represents per-credential issues though some issues may be repeated across several credentials (e.g. bluetooth requirements). SDK- or credential-level errors (such as invalid token or expired credential) are thrown directly by methods like `unlock(using:)` as `SeamSDKV2Error` or `SeamSDKCredentialError` and must be handled via `do/catch`.
56
+
> **Note:** The `.errors` array on credentials represents per-credential issues though some issues may be repeated across several credentials (e.g. bluetooth requirements). Seam SDK- or credential-level errors (such as invalid token or expired credential) are thrown directly by `unlock(using:)` as `SeamError` and must be handled via `do/catch`.
57
57
58
58
## 3. Perform Unlock Operation
59
59
60
-
The call to `SeamSDKManager.shared.unlock(using:)` may throw:
61
-
-`SeamSDKV2Error`: for SDK-level issues (e.g., invalid token, uninitialized SDK).
62
-
-`SeamSDKCredentialError`: for credential-specific issues (e.g., expired credential, device not eligible).
60
+
The call to `Seam.shared.unlock(using:)` may throw:
61
+
-`SeamError`: for SDK-level issues (e.g., invalid token, uninitialized SDK).
62
+
-`SeamCredentialError`: for credential-specific issues (e.g., expired credential, device not eligible).
63
63
Ensure you wrap the call in `do/catch` to handle these errors.
64
64
65
65
Use Async/Await or Combine to initiate an unlock with a selected credential:
0 commit comments