FirebaseAppCheck Framework Reference

AppCheck

class AppCheck : NSObject

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

  • Undocumented

  • Returns a default instance of AppCheck.

    Declaration

    Swift

    class func appCheck() -> Self

    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

    Swift

    class func appCheck(app firebaseApp: FIRApp) -> Self?

    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

    Swift

    class func setAppCheckProviderFactory(_ factory: (any FIRAppCheckProviderFactory)?)
  • 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

    Swift

    var isTokenAutoRefreshEnabled: Bool { get set }