FirebaseAppCheck Framework Reference Stay organized with collections Save and categorize content based on your preferences.
Classes
The following classes are available globally.
Firebase App Check provider that verifies app integrity using theDeviceCheck API.This class is available on all platforms for select OS versions. Seehttps://firebase.google.com/docs/ios/learn-more for more details.
Declaration
Swift
classAppAttestProvider:NSObject,AppCheckProviderA class used to manage app check tokens for a given Firebase app.
Declaration
Swift
classAppCheck:NSObjectA Firebase App Check provider that can exchange a debug token registeredin the Firebase console for a Firebase App Check token. The debug provideris designed to enable testing applications on a simulator or testenvironment.
NOTE: Do not use the debug provider in applications used by real users.
WARNING: Keep the Firebase App Check debug token secret. If youaccidentally share one (e.g. commit to a public source repo), remove it inthe Firebase console ASAP.
To use
AppCheckDebugProvideron a local simulator:- Configure
AppCheckDebugProviderFactorybeforeFirebaseApp.configure():AppCheck.setAppCheckProviderFactory(AppCheckDebugProviderFactory())2. Enable debug logging by adding the-FIRDebugEnabledlaunch argument tothe app target.3. Launch the app. A local debug token will be logged when Firebase isconfigured. For example:“[Firebase/AppCheck][I-FAA001001] Firebase App Check Debug Token:‘3BA09C8C-8A0D-4030-ACD5-B96D99DB73F9’”.4. Register the debug token in the Firebase console.
Once the debug token is registered the debug provider will be able to provide a valid FirebaseApp Check token.
To use
AppCheckDebugProvideron a simulator on a build server:- Create a new Firebase App Check debug token in the Firebase console
- Add the debug token to the secure storage of your build environment. E.g. seeEncryptedsecrets for GitHub Actions,etc.
- Configure
AppCheckDebugProviderFactorybeforeFirebaseApp.configure()AppCheck.setAppCheckProviderFactory(AppCheckDebugProviderFactory()) - Add an environment variable to the scheme with a name
FIRAAppCheckDebugTokenand value like$(MY_APP_CHECK_DEBUG_TOKEN). - Configure the build script to pass the debug token as the environment variable, e.g.:
xcodebuild test -scheme InstallationsExample -workspace InstallationsExample.xcworkspace \MY_APP_CHECK_DEBUG_TOKEN=$(MY_SECRET_ON_CI)
Declaration
Swift
classAppCheckDebugProvider:NSObject,AppCheckProvider- Configure
An implementation of
AppCheckProviderFactorythat creates a new instance ofAppCheckDebugProviderwhen requested.Declaration
Swift
classAppCheckDebugProviderFactory:NSObject,AppCheckProviderFactoryAn object representing a Firebase App Check token.
Declaration
Swift
classAppCheckToken:NSObjectFirebase App Check provider that verifies app integrity using theDeviceCheck API.This class is available on all platforms for select OS versions. Seehttps://firebase.google.com/docs/ios/learn-more for more details.
Declaration
Swift
classDeviceCheckProvider:NSObject,AppCheckProviderAn implementation of
AppCheckProviderFactorythat creates a new instance ofDeviceCheckProviderfor the specifiedFirebaseAppon request. CurrentlyDeviceCheckProviderFactoryis the default that will be used by Firebase App Check if no otherprovider is specified. SeeAppCheckclass for more details.This class is available on all platforms for select OS versions. Seehttps://firebase.google.com/docs/ios/learn-more for more details.Declaration
Swift
classDeviceCheckProviderFactory:NSObject,AppCheckProviderFactory
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-05-03 UTC.