TryYourSizeError
Every error the SDK raises: a stable code, a message and a doc link (like the web SDK).
Each error has a stable code, a message and a docURL. Explanations: Mobile SDK errors.
.secretKeyInApp"secret_key_in_app"OptionalA secret (sk_) or restricted (rk_) key was passed. Those belong on your server.
.invalidKey"invalid_key"OptionalNot a publishable key (pk_test_… / pk_live_…).
.invalidAppIdentifier"invalid_app_identifier"OptionalThe bundle identifier can't be used as an app origin.
.invalidOption"invalid_option"Optional.windowUnreachable"window_unreachable"OptionalOur window did not answer (offline, or blocked).
.appNotAllowed"app_not_allowed"OptionalThis app (ios-app://<bundle id>) is not registered for the key's store.
.signInCancelled"sign_in_cancelled"Optional.signInUnavailable"sign_in_unavailable"OptionalSystem-browser sign-in is not available yet.
Example
Section titled “Example”do { tys = try TryYourSize(publishableKey: key)} catch let error as TryYourSizeError where error.code == .secretKeyInApp { assertionFailure("Use the pk_ key in the app")}Was this page helpful?
Thank you. We read every answer.