The ability to postpone the prompt to the user to opt-in to notifications.
Objective-C
Code Block |
---|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[Appoxee shared] setPostponeNotificationRequest:YES]; // call this method, prior to any Appoxee call, to not show the approve notifications alert by the operating system. [[Appoxee shared] engageAndAutoIntegrateWithLaunchOptions:launchOptions andDelegate:selfnil]; return YES; } |
Swift
Code Block |
---|
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
Appoxee.shared()?.postponeNotificationRequest = true // call this method, prior to any Appoxee call, to not show the approve notifications alert by the operating system.
Appoxee.shared()?.engageAndAutoIntegrateWithLaunchOptions(launchOptions, andDelegate: nil)
return true
} |
To request notifications permissions , call setPostponeNotificationRequest:NO
Objective-C
Code Block |
---|
- (IBACTION)userWantsToBeNotifiedByPushNotifications
{
[[Appoxee shared] setPostponeNotificationRequest:NO];
} |
Swift
Code Block |
---|
func userWantsToBeNotifiedByPushNotifications() {
Appoxee.shared()?.postponeNotificationRequest = false
} |