Search code examples
iosswiftfirebasexcode13firebase-app-check

AppCheck failed: The attestation provider AppAttestProvider is not supported on current platform and OS version


I am getting the following error when trying to integrate App Check into my iOS app.

AppCheck failed: 'The operation couldn’t be completed. The attestation provider AppAttestProvider is not supported on current platform and OS version.'

And ever since getting this error, when I try to fetch a document from Firestore, I get Missing or insufficient permissions. even though all my ready/write security rules are set to true.

For reference, I'm using Xcode 13, my projects settings is set to iOS 15.4, and I'm using the App Attest provider. I am pretty confident I implemented everything correctly, including:

  1. Installing FirebaseAppCheck (I used SPM).
  2. Adding App Attest capability to my app.
  3. In my project's .entitlements file, set the App Attest environment to production.
  4. Setting my app check provider factory in my app delegate before calling FirebaseApp.configure().
  5. Enabling App Check in my Firebase console.

Solution

  • Turns out it was simply because App Check does not work on the simulator without doing a few extra steps. Read this SO post for the solution.