Clarity App Attestation Errors

I'm currently reviewing the various DCError cases defined in Apple’s DeviceCheck framework (reference: https://developer.apple.com/documentation/devicecheck/dcerror-swift.struct). To better understand how to handle these in production, I’m looking for a clear breakdown of:

Which specific DCError values can occur during service.generateKey, service.attestKey, and service.generateAssertion

The realworld scenarios or conditions that typically cause each error for each method.

If anyone has insight on how these errors arise and what conditions trigger them, I’d appreciate your input.

Hello there,

Can i rely on the following mapping:

generateKey — local only, two possible errors:

  1. featureUnsupported (simulator, iOS < 14)

  2. unknownSystemFailure (Secure Enclave fault).

attestKey — contacts Apple servers, possible errors:

  1. featureUnsupported (simulator, iOS < 14)

  2. unknownSystemFailure (Secure Enclave fault)

  3. invalidInput (one time challenge is not hashed properly)

  4. invalidKey (key already attested)

  5. serverUnavailable (no network, Apple service down, rate limiting in action).

generateAssertion — local only, possible errors:

  1. unknownSystemFailure((Secure Enclave fault))

  2. invalidInput (one time challenge is not hashed properly)

  3. invalidKey (key deleted from Secure Enclave).

Clarity App Attestation Errors
 
 
Q