Ir al contenido

TryYourSizeError

Esta página aún no está disponible en tu idioma.

TypeTryYourSize (Swift)

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"Opcional

A secret (sk_) or restricted (rk_) key was passed. Those belong on your server.

.invalidKey"invalid_key"Opcional

Not a publishable key (pk_test_… / pk_live_…).

.invalidAppIdentifier"invalid_app_identifier"Opcional

The bundle identifier can't be used as an app origin.

.invalidOption"invalid_option"Opcional
.windowUnreachable"window_unreachable"Opcional

Our window did not answer (offline, or blocked).

.appNotAllowed"app_not_allowed"Opcional

This app (ios-app://<bundle id>) is not registered for the key's store.

.signInCancelled"sign_in_cancelled"Opcional
.signInUnavailable"sign_in_unavailable"Opcional

System-browser sign-in is not available yet.

do {
tys = try TryYourSize(publishableKey: key)
} catch let error as TryYourSizeError where error.code == .secretKeyInApp {
assertionFailure("Use the pk_ key in the app")
}

¿Te ha resultado útil esta página?