Skip to content

Temporarily restore setAnalyticsCollectionEnabled #2803

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Firebase/Core/FIRAnalyticsConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ - (void)postNotificationName:(NSString *)name value:(id)value {
userInfo:@{name : value}];
}

- (void)setAnalyticsCollectionEnabled:(BOOL)analyticsCollectionEnabled {
[self setAnalyticsCollectionEnabled:analyticsCollectionEnabled persistSetting:YES];
}

- (void)setAnalyticsCollectionEnabled:(BOOL)analyticsCollectionEnabled
persistSetting:(BOOL)shouldPersist {
// Persist the measurementEnabledState. Use FIRAnalyticsEnabledState values instead of YES/NO.
Expand Down
4 changes: 4 additions & 0 deletions Firebase/Core/Private/FIRAnalyticsConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ static NSString *const kFIRAnalyticsConfigurationSetSessionTimeoutIntervalNotifi
/// Returns the shared instance of FIRAnalyticsConfiguration.
+ (FIRAnalyticsConfiguration *)sharedInstance;

// Sets whether analytics collection is enabled for this app on this device. This setting is
// persisted across app sessions. By default it is enabled.
- (void)setAnalyticsCollectionEnabled:(BOOL)analyticsCollectionEnabled;

/// Sets whether analytics collection is enabled for this app on this device, and a flag to persist
/// the value or not. The setting should not be persisted if being set by the global data collection
/// flag.
Expand Down