Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

During Option 1 - Automated Integration In iOS App of auto integration of Mapp SDK is chosen 2.2 option, then the developer can trigger alert dialog for notification permission whenever he wants.

Only iOS SDK has this functionality.

Objective-C

 iOS [Objective-C]
[[Appoxee shared] showNotificationAlertDialog];
 iOS [Swift]
Appoxee.shared()?.showNotificationAlertDialog()


The ability to postpone the prompt to the user to opt-in to notifications.

 iOS [Objective-C]
- (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:nil];
    
    return YES;
}
 iOS [Swift]
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

 iOS [Objective-C]
- (IBACTION)userWantsToBeNotifiedByPushNotifications
{
	[[Appoxee shared] setPostponeNotificationRequest:NO];
}
 iOS [Swift]
func userWantsToBeNotifiedByPushNotifications() {
    
    Appoxee.shared()?.postponeNotificationRequest = false
}


  • No labels