FIRAnalyticsConfiguration

@interface FIRAnalyticsConfiguration : NSObject

This class provides configuration fields for Firebase Analytics.

  • Returns the shared instance of FIRAnalyticsConfiguration.

    Declaration

    Swift

    class func sharedInstance() -> FIRAnalyticsConfiguration!

    Objective-C

    + (FIRAnalyticsConfiguration *)sharedInstance;
  • Sets the minimum engagement time in seconds required to start a new session. The default value is 10 seconds.

    Declaration

    Swift

    func setMinimumSessionInterval(_ minimumSessionInterval: TimeInterval)

    Objective-C

    - (void)setMinimumSessionInterval:(NSTimeInterval)minimumSessionInterval;
  • Sets the interval of inactivity in seconds that terminates the current session. The default value is 1800 seconds (30 minutes).

    Declaration

    Swift

    func setSessionTimeoutInterval(_ sessionTimeoutInterval: TimeInterval)

    Objective-C

    - (void)setSessionTimeoutInterval:(NSTimeInterval)sessionTimeoutInterval;
  • Sets whether analytics collection is enabled for this app on this device. This setting is persisted across app sessions. By default it is enabled.

    Declaration

    Swift

    func setAnalyticsCollectionEnabled(_ analyticsCollectionEnabled: Bool)

    Objective-C

    - (void)setAnalyticsCollectionEnabled:(BOOL)analyticsCollectionEnabled;
  • Deprecated. Sets whether measurement and reporting are enabled for this app on this device. By default they are enabled.

    Declaration

    Swift

    func setIsEnabled(_ isEnabled: Bool)

    Objective-C

    - (void)setIsEnabled:(BOOL)isEnabled;