aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Core/Private
diff options
context:
space:
mode:
authorGravatar Ryan Wilson <wilsonryan@google.com>2018-05-14 10:02:25 -0700
committerGravatar GitHub <noreply@github.com>2018-05-14 10:02:25 -0700
commit08f447cd3fffae80748239daada493fcc19c111f (patch)
tree52049deb6adda8eb87c07d01264bdc2e0be26ac5 /Firebase/Core/Private
parent281d145dc93d310d1dc21fdff61e004faba3b057 (diff)
Add global data collection switch. (#1219)
* Addition of global data collection switch. * Added Messaging conformance to data switch. Also formatted code. * Move data collection flag internal until all SDKs conform to it. * Formatting in response to code review.
Diffstat (limited to 'Firebase/Core/Private')
-rw-r--r--Firebase/Core/Private/FIRAppInternal.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/Firebase/Core/Private/FIRAppInternal.h b/Firebase/Core/Private/FIRAppInternal.h
index b7cf5e8..66979eb 100644
--- a/Firebase/Core/Private/FIRAppInternal.h
+++ b/Firebase/Core/Private/FIRAppInternal.h
@@ -60,6 +60,22 @@ extern NSString *const kFIRAppIsDefaultAppKey;
extern NSString *const kFIRAppNameKey;
extern NSString *const kFIRGoogleAppIDKey;
+/**
+ * The format string for the User Defaults key used for storing the data collection enabled flag.
+ * This includes formatting to append the Firebase App's name.
+ */
+extern NSString *const kFIRGlobalAppDataCollectionEnabledDefaultsKeyFormat;
+
+/**
+ * The plist key used for storing the data collection enabled flag.
+ */
+extern NSString *const kFIRGlobalAppDataCollectionEnabledPlistKey;
+
+/**
+ * A notification fired containing diagnostic information when SDK errors occur.
+ */
+extern NSString *const kFIRAppDiagnosticsNotification;
+
/** @var FIRAuthStateDidChangeInternalNotification
@brief The name of the @c NSNotificationCenter notification which is posted when the auth state
changes (e.g. a new token has been produced, a user logs in or out). The object parameter of
@@ -181,6 +197,18 @@ typedef NSString *_Nullable (^FIRAppGetUIDImplementation)(void);
*/
- (nullable NSString *)getUID;
+/**
+ * WARNING: THIS SETTING DOES NOT WORK YET. IT WILL BE MOVED TO THE PUBLIC HEADER ONCE ALL SDKS
+ * CONFORM TO THIS PREFERENCE. DO NOT RELY ON IT.
+ *
+ * Gets or sets whether automatic data collection is enabled for all products. Defaults to `YES`
+ * unless `FirebaseAutomaticDataCollectionEnabled` is set to `NO` in your app's Info.plist. This
+ * value is persisted across runs of the app so that it can be set once when users have consented to
+ * collection.
+ */
+@property(nonatomic, readwrite, getter=isAutomaticDataCollectionEnabled)
+ BOOL automaticDataCollectionEnabled;
+
@end
NS_ASSUME_NONNULL_END