[ad_1]
I’m presently creating an iOS utility through which I’ve built-in AppCheck from Firebase.
For iOS, AppCheck has the selection between two important suppliers: DeviceCheck and AppAttest.
I understood that DeviceCheck was much less safe than AppAttest so I made positive that AppAttest is appropriately applied in my undertaking by following the Firebase documentation:
Steps adopted on the documentation
And under is the code in my Xcode undertaking
In MyAppCheckProviderFactory.swift :
class MyAppCheckProviderFactory: NSObject, AppCheckProviderFactory {
func createProvider(with app: FirebaseApp) -> AppCheckProvider? {
return AppAttestProvider(app: app)
}
}
In AppDelegate :
func utility(_ utility: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override level for personalisation after utility launch.
// We outline the attestation supplier for AppCheck
let providerFactory = MyAppCheckProviderFactory()
AppCheck.setAppCheckProviderFactory(providerFactory)
FirebaseApp.configure()
return true
}
Right here you’ll be able to see that all the pieces appears to work on the Firebase console:
I do know that usually the code I wrote above assures me that AppAttest is chosen however is there any means I can make it possible for is the case?
Additionally I’ve created a DeviceCheck non-public key on my Apple Developper account, can I delete it?
Be aware that I have already got deleted the p8 file for DeviceCheck on Firebase as you’ll be able to see right here however the Key ID and Crew ID fields are nonetheless stuffed in (as I had applied DeviceCheck beforehand), can I additionally delete this with out concern of affecting AppAttest. Is it in order that the 2 suppliers are completely unbiased?
Lastly, I’ve set the minimal iOS model allowed on my app to 14.0 (as AppAttest is barely accessible from this model):
Like this within the Xcode undertaking
What would occur if a person with iOS < 14 nonetheless managed to get my app?
Thanks very a lot in your consideration and I want you a pleasant day 🙂 !
[ad_2]
