FIRAnalyticsConfiguration


@interface FIRAnalyticsConfiguration : NSObject

This class provides configuration fields for Firebase Analytics.

  • Returns the shared instance of FIRAnalyticsConfiguration.

    Declaration

    Swift

    class func shared() -> AnalyticsConfiguration

    Objective-C

    + (nonnull 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;