Skip to content

Commit

Permalink
GITBOOK-510: Note missing iOS functions
Browse files Browse the repository at this point in the history
  • Loading branch information
DebbieAtSeam authored and gitbook-bot committed Jan 2, 2025
1 parent 789f35e commit caffd3f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if (requiredPermissions.isNotEmpty()) {

{% tab title="iOS Swift" %}
```swift
let requiredPermissions = seam.phone.native.listRequiredIosPermissions(
let requiredPermissions = seam.phone.native.listRequiredIosPermissions( // Coming soon!
enableUnlockWithTap: true
)

Expand Down Expand Up @@ -80,13 +80,13 @@ func eventDelegate(
// Note that these events are located under the phone namespace.
switch (event) {
case .phone:
let phone = seam.phone.get().nativeMetadata
let phone = seam.phone.get().nativeMetadata // Coming soon!

// The desired state has not been met.
if(!phone.canUnlockWithTap) {
if (phone.errors.contains(where: $0 == {.phone(.native(.missingRequiredIosPermissions)))}) {
// Need to update the required permissions.
let requiredPermissions = seam.phone.native.listRequiredIosPermissions(
let requiredPermissions = seam.phone.native.listRequiredIosPermissions( // Coming soon!
enableUnlockWithTap: true
)
// Request the requiredPermissions or prompt the user to do so.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func (
// If the event is under the phone namespace, the phone state may have changed.
switch(event) {
case .phone:
let phone = seam.phone.get().nativeMetadata
let phone = seam.phone.get().nativeMetadata // Coming soon!

// Check for the desired state of the phone for all app features to work.
if (!phone.isInitialized || !phone.canUnlockWithTap) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MyEventHandler implements ISeamEventHandler {
{% tab title="iOS Swift" %}
```swift
// Retrieve mobile credentials explicitly.
if (seam.phone.get().nativeMetadata.isInitialized) {
if (seam.phone.get().nativeMetadata.isInitialized) { // Coming soon!
let credentials = seam.phone.native.credentials.list()
}

Expand Down Expand Up @@ -88,7 +88,7 @@ if (requiredPermissions.isNotEmpty()) {

{% tab title="iOS Swift" %}
```swift
let requiredPermissions = seam.phone.native.listRequiredIosPermissions(
let requiredPermissions = seam.phone.native.listRequiredIosPermissions( // Coming soon!
enableUnlockWithTap: true
)

Expand Down Expand Up @@ -137,7 +137,7 @@ fun handleEvent(event: SeamEvent) {
// Check for changes in the phone state under the phone namespace.
switch (event) {
case .phone:
let phone = seam.phone.get().nativeMetadata
let phone = seam.phone.get().nativeMetadata // Coming soon!

// Verify if the phone cannot unlock with tap.
if(!phone.canUnlockWithTap) {
Expand Down Expand Up @@ -185,7 +185,7 @@ if (seam.phone.get().can_unlock_with_tap) {
fun handleEvent(event: SeamEvent) {
// Check for changes in the phone state, under the phone namespace.
if (event is SeamEvent.Phone) {
unlockWithTap = seam.phone.native.unlockWithTap.get()
unlockWithTap = seam.phone.native.unlockWithTap.get() // Coming soon!

if (unlockWithTap.isRunning) {
if (!unlockWithTap.isScanning) {
Expand Down Expand Up @@ -223,12 +223,12 @@ func handleEvent(event: SeamEvent) {
// Check for changes in the phone state, under the phone namespace.
switch(event) {
case .phone:
let unlockWithTap = seam.phone.native.unlockWithTap.get()
let unlockWithTap = seam.phone.native.unlockWithTap.get() // Coming soon!
if unlockWithTap.isRunning {
if !unlockWithTap.isScanning {
// Set the UI state to indicate that the phone is not scanning.
// Check the error map because scanning is expected but is not occurring.
let errors = seam.phone.get().nativeMetadata.errors
let errors = seam.phone.get().nativeMetadata.errors // Coming soon!
// Errors to look out for could include:
// - BluetoothConnectionRequired: Bluetooth is turned off.
// - NoCredential: Missing credentials for operation.
Expand Down

0 comments on commit caffd3f

Please sign in to comment.