diff --git a/platform-darwin/Source/Mac/MPMacAppDelegate.m b/platform-darwin/Source/Mac/MPMacAppDelegate.m index 0dcc7f0a..3dd0bfc6 100644 --- a/platform-darwin/Source/Mac/MPMacAppDelegate.m +++ b/platform-darwin/Source/Mac/MPMacAppDelegate.m @@ -125,7 +125,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven countlyConfig.host = @"https://countly.lyndir.com"; countlyConfig.appKey = decrypt( countlyKey ); countlyConfig.features = @[ CLYPushNotifications ]; - countlyConfig.requiresConsent = YES; + //countlyConfig.requiresConsent = YES; // FIXME: https://support.count.ly/hc/en-us/community/posts/900000930423-Notifications-on-macOS countlyConfig.alwaysUsePOST = YES; countlyConfig.deviceID = [PearlKeyChain deviceIdentifier]; countlyConfig.secretSalt = decrypt( countlySalt ); @@ -137,6 +137,9 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven countlyConfig.enableDebug = NO; #endif [Countly.sharedInstance startWithConfig:countlyConfig]; + + [Countly.sharedInstance giveConsentForFeature:CLYConsentPushNotifications]; + [Countly.sharedInstance askForNotificationPermission]; } @catch (id exception) { err( @"During Analytics Setup: %@", exception ); diff --git a/platform-darwin/Source/Mac/MasterPassword.entitlements b/platform-darwin/Source/Mac/MasterPassword.entitlements index 32c0b065..4a228477 100644 --- a/platform-darwin/Source/Mac/MasterPassword.entitlements +++ b/platform-darwin/Source/Mac/MasterPassword.entitlements @@ -2,6 +2,8 @@ + com.apple.developer.aps-environment + development com.apple.security.app-sandbox com.apple.security.application-groups