Troubleshooting on iOS
PingOne iOS
Handling errors
The module converts errors from the native PingOne MFA SDK into PingOneMFAError, so your app never works with the native SDK’s error classes directly.
The module’s functions throw a PingOneMFAError on failure:
do {
try await PingOneMFA.pair(pairingKey: pairingKey)
} catch let error as PingOneMFAError {
print(error.message)
error.internalErrorsList?.forEach { e in
print("code=\(e.code) message=\(e.message)")
}
} catch {
print(error.localizedDescription)
}
Use the message property for display or simple logging. Use internalErrorsList for developer diagnostics only; it contains one entry per underlying native SDK error, each with the numeric error code, a message, and any additional server-provided diagnostic data. The entries in internalErrorsList are not suitable for showing to users.
The error codes match those listed in the PingOne MFA SDK for iOS error codes.
Troubleshooting
- Push notifications not received
-
-
Verify that the APNS push token was registered with
setDeviceToken. -
Confirm that push notification entitlements and capabilities are enabled in your Xcode project.
-
Check that APNS is configured in your PingOne environment.
-
- One-time passcode request fails with a device-not-paired error
-
Ensure that
pairwas called and succeeded before requesting a passcode. - Initialization or pairing fails unexpectedly
-
-
Check network connectivity to the PingOne MFA service.
-
Confirm that the geography passed to
initialize(geo:)matches the region of your PingOne environment.
-