FirebaseAppCheck Framework Reference

FIRAppCheck


@interface FIRAppCheck : NSObject

A class used to manage app check tokens for a given Firebase app.

  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • Returns a default instance of AppCheck.

    Declaration

    Objective-C

    + (nonnull instancetype)appCheck;

    Return Value

    An instance of AppCheck for FirebaseApp.defaultApp(). @throw Throws an exception if the default app is not configured yet or required FirebaseApp options are missing.

  • Returns an instance of AppCheck for an application.

    Declaration

    Objective-C

    + (nullable instancetype)appCheckWithApp:(nonnull FIRApp *)firebaseApp;

    Parameters

    firebaseApp

    A configured FirebaseApp instance if exists.

    Return Value

    An instance of AppCheck corresponding to the passed application. @throw Throws an exception if required FirebaseApp options are missing.

  • Sets the AppCheckProviderFactory to use to generate AppCheckDebugProvider objects.

    An instance of DeviceCheckProviderFactory is used by default, but you can also use a custom AppCheckProviderFactory implementation or an instance of AppCheckDebugProviderFactory to test your app on a simulator on a local machine or a build server.

    NOTE: Make sure to call this method before FirebaseApp.configure(). If this method is called after configuring Firebase, the changes will not take effect.

    Declaration

    Objective-C

    + (void)setAppCheckProviderFactory:
        (nullable id<FIRAppCheckProviderFactory>)factory;
  • If this flag is disabled then Firebase app check will not periodically auto-refresh the app check token. The default value of the flag is equal to FirebaseApp.dataCollectionDefaultEnabled. To disable the flag by default set FirebaseAppCheckTokenAutoRefreshEnabled flag in the app Info.plist to NO. Once the flag is set explicitly, the value will be persisted and used as a default value on next app launches.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isTokenAutoRefreshEnabled;