Commit 9b52b332 by Demid Merzlyakov

Push Notification permission is requested after the Privacy Prompt, so that it…

Push Notification permission is requested after the Privacy Prompt, so that it didn't interrupt location prompt, etc.
parent 7c4248a5
...@@ -72,8 +72,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -72,8 +72,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
MoEngage.sharedInstance().initializeLive(with: moEngageConfig, andLaunchOptions: launchOptions) MoEngage.sharedInstance().initializeLive(with: moEngageConfig, andLaunchOptions: launchOptions)
#endif #endif
PushNotificationsManager.shared.registerForRemoteNotifications()
return true return true
} }
......
...@@ -76,6 +76,7 @@ class TodayViewModel: ViewModelProtocol { ...@@ -76,6 +76,7 @@ class TodayViewModel: ViewModelProtocol {
public func privacyPolicyHasBeenViewed() { public func privacyPolicyHasBeenViewed() {
ccpaHelper.shownPrivacyNoticeBefore = true ccpaHelper.shownPrivacyNoticeBefore = true
initializeAllAdsIfNeeded() initializeAllAdsIfNeeded()
PushNotificationsManager.shared.registerForRemoteNotifications()
} }
public func showOnboardingOrPrivacyNoticeIfNeeded() { public func showOnboardingOrPrivacyNoticeIfNeeded() {
...@@ -93,6 +94,7 @@ class TodayViewModel: ViewModelProtocol { ...@@ -93,6 +94,7 @@ class TodayViewModel: ViewModelProtocol {
} }
else { else {
self.initializeAllAdsIfNeeded() self.initializeAllAdsIfNeeded()
PushNotificationsManager.shared.registerForRemoteNotifications()
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment