'How do I know which provider AppCheck is using on iOS?
I am currently developing an iOS application in which I have integrated AppCheck from Firebase. For iOS, AppCheck has the choice between two main providers: DeviceCheck and AppAttest. I understood that DeviceCheck was less secure than AppAttest so I made sure that AppAttest is correctly implemented in my project by following the Firebase documentation:
Steps followed on the documentation
And below is the code in my Xcode project
In MyAppCheckProviderFactory.swift :
class MyAppCheckProviderFactory: NSObject, AppCheckProviderFactory {
func createProvider(with app: FirebaseApp) -> AppCheckProvider? {
return AppAttestProvider(app: app)
}
}
In AppDelegate :
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
// We define the attestation provider for AppCheck
let providerFactory = MyAppCheckProviderFactory()
AppCheck.setAppCheckProviderFactory(providerFactory)
FirebaseApp.configure()
return true
}
Here you can see that everything seems to work on the Firebase console:
I know that normally the code I wrote above assures me that AppAttest is chosen but is there any way I can make sure that is the case?
Also I have created a DeviceCheck private key on my Apple Developper account, can I delete it? Note that I already have deleted the p8 file for DeviceCheck on Firebase as you can see here but the Key ID and Team ID fields are still filled in (as I had implemented DeviceCheck previously), can I also delete this without fear of affecting AppAttest. Is it so that the two providers are totally independent?
Finally, I have set the minimum iOS version allowed on my app to 14.0 (as AppAttest is only available from this version):
Like this in the Xcode project
What would happen if a user with iOS < 14 still managed to get my app?
Thank you very much for your attention and I wish you a nice day :) !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
