We would like to use iOS App Attest to establish our app's integrity. However, the documentation at https://developer.apple.com/documentation/devicecheck/establishing-your-app-s-integrity is quite vague about what the server may return when we call service.attestKey to check the app integrity with Apple's server.
In particular, it merely says:
If the method, which accesses a remote Apple server, returns the serverUnavailable error, try attestation again later with the same key. For any other error, discard the key identifier and create a new key when you want to try again. Otherwise, send the completion handler’s attestation object and the keyId to your server for processing.
So there may be a variety of possible errors (other than serverUnavailable, in which case we need to try again later), but Apple doesn't say how we interpret those errors. Does it mean that Apple has detected an issue with app integrity whenever we get ANY error (other than serverUnavailable)? Why should we "create a new key when you want to try again"? It may be a transient error?