Use App Check with the debug provider on Apple platforms

If, after you have registered your app forApp Check, you want to run yourapp in an environment thatApp Check would normally not classify as valid,such as a simulator or device during development, or from a continuousintegration (CI) environment, you can create a debug build of your app that usestheApp Check debug provider instead of a real attestation provider.

Warning: The debug provider allows access to your Firebase resources fromunverified devices.Don't use the debug provider in production builds ofyour app, and be careful not to leak your debug token.

Use the debug provider in development

To use the debug provider while running your app interactively(during development, for example), do the following:

  1. In your debug build, before using any Firebase backend services, create andset theApp Check debug provider factory:

    Swift

    letproviderFactory=AppCheckDebugProviderFactory()AppCheck.setAppCheckProviderFactory(providerFactory)FirebaseApp.configure()

    Objective-C

    FIRAppCheckDebugProviderFactory*providerFactory=[[FIRAppCheckDebugProviderFactoryalloc]init];[FIRAppChecksetAppCheckProviderFactory:providerFactory];// Use Firebase library to configure APIs[FIRAppconfigure];
  2. Enable debug logging in your Xcode project (v11.0 or newer):

    1. OpenProduct > Scheme > Edit scheme.
    2. SelectRun from the left menu, then select theArguments tab.
    3. In theArguments Passed on Launch section, add-FIRDebugEnabled.
  3. Launch the app. A local debug token will be logged when the SDK tries tosend a request to the backend. For example:

    [Firebase/AppCheck][I-FAA001001] Firebase App Check Debug Token:123a4567-b89c-12d3-e456-789012345678
  4. In theApp Check sectionof theFirebase console, chooseManage debug tokens from your app'soverflow menu. Then, register the debug token you logged in the previousstep.

    Screenshot of the Manage Debug Tokens menu item

After you register the token, Firebase backend services will accept it as valid.

Because this token allows access to your Firebase resources without avalid device, it is crucial that you keep it private. Don't commit it to apublic repository, and if a registered token is ever compromised, revoke itimmediately in theFirebase console.

Use the debug provider in a CI environment

To use the debug provider in a continuous integration (CI) environment, do thefollowing:

  1. In theApp Check sectionof theFirebase console, chooseManage debug tokens from your app'soverflow menu. Then, create a new debug token. You'll need the token in thenext step.

    Because this token allows access to your Firebase resources withouta valid device, it is crucial that you keep it private. Don't commit it to apublic repository, and if a registered token is ever compromised, revoke itimmediately in theFirebase console.

    Screenshot of the Manage Debug Tokens menu item

  2. Add the debug token you just created to your CI system's secure key store(for example, GitHub Actions'encrypted secrets or Travis CI'sencrypted variables).

  3. If necessary, configure your CI system to make your debug token availablewithin the CI environment as an environment variable. Name the variablesomething likeAPP_CHECK_DEBUG_TOKEN_FROM_CI.

  4. In Xcode, add an environment variable to your testing scheme with the nameFIRAAppCheckDebugToken and something like$(APP_CHECK_DEBUG_TOKEN) asthe value.

  5. Configure your CI test script to pass the debug token as an environmentvariable. For example:

    xcodebuild test -schemeYourTestScheme -workspaceYourProject.xcworkspace \APP_CHECK_DEBUG_TOKEN=$(APP_CHECK_DEBUG_TOKEN_FROM_CI)
  6. In your debug build, before using any Firebase backend services, create andset theApp Check debug provider factory:

    Swift

    letproviderFactory=AppCheckDebugProviderFactory()AppCheck.setAppCheckProviderFactory(providerFactory)FirebaseApp.configure()

    Objective-C

    FIRAppCheckDebugProviderFactory*providerFactory=[[FIRAppCheckDebugProviderFactoryalloc]init];[FIRAppChecksetAppCheckProviderFactory:providerFactory];// Use Firebase library to configure APIs[FIRAppconfigure];

When your app runs in a CI environment, Firebase backend services will acceptthe token it sends as valid.

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 2026-02-18 UTC.