From 6dd8790404a6177563ae6cf76dfe80de41fb8f66 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Tue, 7 Apr 2020 16:05:53 -0400 Subject: [PATCH] Enable/disable Sentry on iOS with sendInfo. --- platform-darwin/Source/iOS/MPiOSAppDelegate.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform-darwin/Source/iOS/MPiOSAppDelegate.m b/platform-darwin/Source/iOS/MPiOSAppDelegate.m index a3093436..e6309441 100644 --- a/platform-darwin/Source/iOS/MPiOSAppDelegate.m +++ b/platform-darwin/Source/iOS/MPiOSAppDelegate.m @@ -681,12 +681,14 @@ prefs[@"reviewedVersion"] = @(YES); #endif + [SentrySDK.currentHub getClient].options.enabled = @YES; [SentrySDK configureScope:^(SentryScope *scope) { for (NSString *pref in prefs.allKeys) [scope setExtraValue:prefs[pref] forKey:pref]; }]; } else { + [SentrySDK.currentHub getClient].options.enabled = @NO; [Countly.sharedInstance cancelConsentForAllFeatures]; } }