2
0

Enable/disable Sentry on iOS with sendInfo.

This commit is contained in:
Maarten Billemont 2020-04-07 16:05:53 -04:00
parent 508abec94e
commit 6dd8790404

View File

@ -681,12 +681,14 @@
prefs[@"reviewedVersion"] = @(YES); prefs[@"reviewedVersion"] = @(YES);
#endif #endif
[SentrySDK.currentHub getClient].options.enabled = @YES;
[SentrySDK configureScope:^(SentryScope *scope) { [SentrySDK configureScope:^(SentryScope *scope) {
for (NSString *pref in prefs.allKeys) for (NSString *pref in prefs.allKeys)
[scope setExtraValue:prefs[pref] forKey:pref]; [scope setExtraValue:prefs[pref] forKey:pref];
}]; }];
} }
else { else {
[SentrySDK.currentHub getClient].options.enabled = @NO;
[Countly.sharedInstance cancelConsentForAllFeatures]; [Countly.sharedInstance cancelConsentForAllFeatures];
} }
} }