provisionCredential(configurationUUID:name:)
Creates a credential in the Secure Element.
Declaration
func provisionCredential(configurationUUID: UUID, name: String) async throws -> CredentialSession.CredentialParameters
- configurationUUID:
A UUID corresponding to an product configuration configured on the Login portal. The system uses the corresponding product configuration to provision the instance associated with the created credential. The UUID is opaque to the device.
- name:
A friendly name assigned for ease of identification the provisioned credential. The name is opaque to the device.
Mentioned in
Return Value
A CredentialSession.Credential, initialized with the CredentialSession.Credential.State.installationPending state.
Discussion
This method installs into the Secure Element an applet bundle that you’ve submitted through the Apple Business Register portal.
The most common errors are:
CredentialSession.ErrorCode.invalidInput: The
nameparameter is empty.CredentialSession.ErrorCode.invalidSessionState: The session isn’t in the CredentialSession.State.management state.
CredentialSession.ErrorCode.invalidProductConfigID: The
configurationUUIDdoes not correspond to a known product configuration.CredentialSession.ErrorCode.insufficientSpace: The Secure Element doesn’t have enough storage space.
CredentialSession.ErrorCode.network: A network error occurred during provisioning.
CredentialSession.ErrorCode.conditionsNotSatisfied: The iCloud account or passcode conditions aren’t met.