{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"AppDelegate Configuration","type":"basic","slug":"pulsate-appdelegate-configuration","excerpt":"","body":"Pulsate1 by default takes ownership of the AppDelegate and sends callbacks back to your AppDelegate. If needed you can inform Pulsate to not take ownership of the AppDelegate, but you will need to send the needed AppDelegate callbacks to Pulsate.\n[block:api-header]\n{\n  \"title\": \"1. Taking ownership of the AppDelegate and UNUserNotificationCenterDelegate\"\n}\n[/block]\nTo inform Pulsate that you want to be the main AppDelegate all you need to do is use this method in the \"*didFinishLaunchingWithOptions*\" callback.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\\n  PULPulsateManager* pulsateManager = [PULPulsateFactory getInstanceWithAuthorizationData:authData withLocationEnabled:YES withPushEnabled:YES withLaunchOptions:launchOptions withPulsateAppDelegate:NO andPulsateNotificationDelegate:NO error:&error];\\n}\\n\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {\\n    pulsateManager = try? PULPulsateFactory.getInstanceWith(authData as? PULAuthorizationData, withLocationEnabled: true, withPushEnabled: true, withLaunchOptions: launchOptions, withPulsateAppDelegate: false, andPulsateNotificationDelegate:false)\\n}\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\"*withPulsateAppDelegate:NO*\" informs Pulsate that it should not take ownership of the AppDelegate. \"andPulsateNotificationDelegate:NO\" informs Pulsate that it should not take ownership of the UNUserNotificationCenterDelegate.\n[block:api-header]\n{\n  \"title\": \"2. Getting the PulsateSystemManager\"\n}\n[/block]\nFor Pulsate to function properly you must send the AppDelegate and UNUserNotificationCenterDelegate Callbacks to the PulsateSystemManager. To get the PulsateSystemManager with the \"*UIApplicationDelegate*\" all you need to do is call:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"id<UIApplicationDelegate> pulsateSystemManager;\\npulsateSystemManager = [pulsateManager getPulsateSystemManager];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var pulsateSystemManager: UIApplicationDelegate?\\npulsateSystemManager = pulsateManager?.getPulsateSystemManager()\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\nTo get the PulsateSystemManager as both an \"*UIApplicationDelegate*\" and a \"*UNUserNotificationCenterDelegate*\" all you need to do is extend the pulsateSystemManager:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"id<UIApplicationDelegate, UNUserNotificationCenterDelegate> pulsateSystemManager;\\npulsateSystemManager = [pulsateManager getPulsateSystemManager];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var pulsateSystemManager:(UIApplicationDelegate & UNUserNotificationCenterDelegate)?\\npulsateSystemManager = pulsateManager?.getPulsateSystemManager()\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"3. AppDelegate Callbacks\"\n}\n[/block]\nPulsate needs many AppDelegate Callbacks to function properly. To inform Pulsate about the AppDelegate callback simply call the proper method in the \"*pulsateSystemManager*\".\n\nHere you can find the full list of callbacks, and how to send them to Pulsate.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken\\n{\\n    [pulsateSystemManager application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];\\n}\\n\\n-(void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error\\n{\\n    [pulsateSystemManager application:application didFailToRegisterForRemoteNotificationsWithError:error];\\n}\\n\\n-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler\\n{\\n    [pulsateSystemManager application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];\\n}\\n\\n-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options\\n{\\n    return [pulsateSystemManager application:app openURL:url options:options];\\n}\\n\\n- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation\\n{\\n    return [pulsateSystemManager application:application openURL:url sourceApplication:sourceApplication annotation:annotation];\\n}\\n\\n- (void)applicationDidBecomeActive:(UIApplication *)application {\\n    [pulsateSystemManager applicationDidBecomeActive:application];\\n}\\n\\n-(void)applicationWillEnterForeground:(UIApplication *)application\\n{\\n    [pulsateSystemManager applicationWillEnterForeground:application];\\n}\\n\\n-(void)applicationDidEnterBackground:(UIApplication *)application\\n{\\n    [pulsateSystemManager applicationDidEnterBackground:application];\\n}\\n\\n- (void)applicationWillResignActive:(UIApplication *)application {\\n    [pulsateSystemManager applicationWillResignActive:application];\\n}\\n\\n- (void)applicationWillTerminate:(UIApplication *)application {\\n    [pulsateSystemManager applicationWillTerminate:application];\\n}\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {\\n    pulsateSystemManager?.application!(application, didRegisterForRemoteNotificationsWithDeviceToken: deviceToken);\\n}\\n    \\nfunc application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {\\n    pulsateSystemManager?.application!(application, didFailToRegisterForRemoteNotificationsWithError: error);\\n}\\n    \\nfunc application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {\\n    pulsateSystemManager?.application!(application, didReceiveRemoteNotification: userInfo);\\n}\\n    \\nfunc applicationWillResignActive(_ application: UIApplication) {\\n    pulsateSystemManager?.applicationWillResignActive!(application)\\n}\\n    \\nfunc applicationDidEnterBackground(_ application: UIApplication) {\\n    pulsateSystemManager?.applicationDidEnterBackground!(application)\\n}\\n    \\nfunc applicationWillEnterForeground(_ application: UIApplication) {\\n    pulsateSystemManager?.applicationWillEnterForeground!(application)\\n}\\n    \\nfunc applicationDidBecomeActive(_ application: UIApplication) {\\n    pulsateSystemManager?.applicationDidBecomeActive!(application)\\n}\\n    \\nfunc applicationWillTerminate(_ application: UIApplication) {\\n    pulsateSystemManager?.applicationWillTerminate!(application)\\n}\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"4. UNUserNotificationCenterDelegate callbacks\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler\\n{\\n\\tNSDictionary *userInfo = response.notification.request.content.userInfo;\\n  if ([userInfo[:::at:::\\\"sender\\\"] isKindOfClass:[NSString class]]) {\\n  \\tNSString *sender = userInfo[@\\\"sender\\\"];\\n    if ([sender isEqualToString:@\\\"Pulsate\\\"]) {\\n    \\t// Pulsate was the sender of the push, let Pulsate handle the Push\\n     [pulsateSystemManager userNotificationCenter:center didReceiveNotificationResponse:response withCompletionHandler:completionHandler];\\n      return;\\n    }\\n  }\\n\\n\\t// Pulsate was not the sender of the push, handle it manually\\n  completionHandler();\\n}\\n\\n- (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler\\n{\\n\\tNSDictionary *userInfo = notification.request.content.userInfo;\\n\\n\\tif ([userInfo[@\\\"sender\\\"] isKindOfClass:[NSString class]]) {\\n  \\tNSString *sender = userInfo[@\\\"sender\\\"];\\n    \\tif ([sender isEqualToString:@\\\"Pulsate\\\"]) {\\n      \\t// Pulsate was the sender of the push, let Pulsate handle the Push\\n        [pulsateSystemManager userNotificationCenter:center willPresentNotification:notification withCompletionHandler:completionHandler];\\n        return;\\n      }\\n\\t}\\n\\n  // Pulsate was not the sender of the push, handle it manually\\n  completionHandler(UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionSound);\\n}\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void)\\n{\\n  let userInfo = notification.request.content.userInfo\\n  if (userInfo[\\\"sender\\\"] is String) {\\n    let sender = userInfo[\\\"sender\\\"] as? String\\n    if (sender == \\\"Pulsate\\\") {\\n      // Pulsate was the sender of the push, let Pulsate handle the Push\\n      pulsateSystemManager?.userNotificationCenter!(center, willPresent: notification, withCompletionHandler: completionHandler)\\n      return\\n    }\\n  }    \\n  // Pulsate was not the sender of the push, handle it manually\\n  completionHandler([.alert, .badge, .sound])\\n}\\n    \\nfunc userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {\\n  let userInfo = response.notification.request.content.userInfo\\n  if (userInfo[\\\"sender\\\"] is String) {\\n    let sender = userInfo[\\\"sender\\\"] as? String\\n    if (sender == \\\"Pulsate\\\") {\\n      // Pulsate was the sender of the push, let Pulsate handle the Push\\n      pulsateSystemManager?.userNotificationCenter!(center, didReceive: response, withCompletionHandler: completionHandler)\\n      return\\n    }\\n  }\\n  completionHandler()\\n}    \",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"UNUserNotificationCenterDelegate with Deployment Target below iOS 10\",\n  \"body\": \"If your deployment target is below iOS 10 you can not use the UNUserNotificationCenterDelegate as a global variable, it is only available in iOS 10 and above. Instead use the pulsateManager to give you the pulsateSystemManager variable when needed. Example: pulsateManager?.getPulsateSystemManager().userNotificationCenter!(center, didReceive: response, withCompletionHandler: completionHandler)\"\n}\n[/block]","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5e5013741b3b2000653294fb","__v":0,"project":"54aa7f773b56130b0056c86e","user":"57bc3654b9c7f0220009c77b","version":{"version":"2.7","version_clean":"2.7.0","codename":"iOS SDK","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5e5013741b3b200065329486","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","5e5013741b3b200065329487","5e5013741b3b200065329488","5e5013741b3b200065329489","5e5013741b3b20006532948a","5e5013741b3b20006532948b","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","5e5013741b3b20006532948c","5e5013741b3b20006532948d","5c73dd27e8fdc000572a206a","5e5013741b3b20006532948e","5e53d9a2f75c0b0020de8935","5f44d1fbd1c58d040fdf03ba","5f44d202a2e3eb02b1c4c806","5f44d209703f05006a2a4fa9","5f44d210b1ba9f004200b689"],"_id":"5e5013741b3b20006532951d","project":"54aa7f773b56130b0056c86e","forked_from":"5e4fbbbda8fb41028f1861fe","__v":5,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"SDK Advanced","slug":"sdk-advanced","order":3,"from_sync":false,"reference":false,"_id":"5f44d209703f05006a2a4fa9","createdAt":"2020-08-25T08:55:37.604Z","version":"5e5013741b3b20006532951d","project":"54aa7f773b56130b0056c86e","__v":0},"createdAt":"2017-03-30T08:44:26.681Z","githubsync":"","parentDoc":null}

AppDelegate Configuration


Pulsate1 by default takes ownership of the AppDelegate and sends callbacks back to your AppDelegate. If needed you can inform Pulsate to not take ownership of the AppDelegate, but you will need to send the needed AppDelegate callbacks to Pulsate. [block:api-header] { "title": "1. Taking ownership of the AppDelegate and UNUserNotificationCenterDelegate" } [/block] To inform Pulsate that you want to be the main AppDelegate all you need to do is use this method in the "*didFinishLaunchingWithOptions*" callback. [block:code] { "codes": [ { "code": "- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n PULPulsateManager* pulsateManager = [PULPulsateFactory getInstanceWithAuthorizationData:authData withLocationEnabled:YES withPushEnabled:YES withLaunchOptions:launchOptions withPulsateAppDelegate:NO andPulsateNotificationDelegate:NO error:&error];\n}\n", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {\n pulsateManager = try? PULPulsateFactory.getInstanceWith(authData as? PULAuthorizationData, withLocationEnabled: true, withPushEnabled: true, withLaunchOptions: launchOptions, withPulsateAppDelegate: false, andPulsateNotificationDelegate:false)\n}", "language": "swift" } ] } [/block] "*withPulsateAppDelegate:NO*" informs Pulsate that it should not take ownership of the AppDelegate. "andPulsateNotificationDelegate:NO" informs Pulsate that it should not take ownership of the UNUserNotificationCenterDelegate. [block:api-header] { "title": "2. Getting the PulsateSystemManager" } [/block] For Pulsate to function properly you must send the AppDelegate and UNUserNotificationCenterDelegate Callbacks to the PulsateSystemManager. To get the PulsateSystemManager with the "*UIApplicationDelegate*" all you need to do is call: [block:code] { "codes": [ { "code": "id<UIApplicationDelegate> pulsateSystemManager;\npulsateSystemManager = [pulsateManager getPulsateSystemManager];", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "var pulsateSystemManager: UIApplicationDelegate?\npulsateSystemManager = pulsateManager?.getPulsateSystemManager()", "language": "swift" } ] } [/block] To get the PulsateSystemManager as both an "*UIApplicationDelegate*" and a "*UNUserNotificationCenterDelegate*" all you need to do is extend the pulsateSystemManager: [block:code] { "codes": [ { "code": "id<UIApplicationDelegate, UNUserNotificationCenterDelegate> pulsateSystemManager;\npulsateSystemManager = [pulsateManager getPulsateSystemManager];", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "var pulsateSystemManager:(UIApplicationDelegate & UNUserNotificationCenterDelegate)?\npulsateSystemManager = pulsateManager?.getPulsateSystemManager()", "language": "swift" } ] } [/block] [block:api-header] { "title": "3. AppDelegate Callbacks" } [/block] Pulsate needs many AppDelegate Callbacks to function properly. To inform Pulsate about the AppDelegate callback simply call the proper method in the "*pulsateSystemManager*". Here you can find the full list of callbacks, and how to send them to Pulsate. [block:code] { "codes": [ { "code": "-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken\n{\n [pulsateSystemManager application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];\n}\n\n-(void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error\n{\n [pulsateSystemManager application:application didFailToRegisterForRemoteNotificationsWithError:error];\n}\n\n-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler\n{\n [pulsateSystemManager application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];\n}\n\n-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options\n{\n return [pulsateSystemManager application:app openURL:url options:options];\n}\n\n- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation\n{\n return [pulsateSystemManager application:application openURL:url sourceApplication:sourceApplication annotation:annotation];\n}\n\n- (void)applicationDidBecomeActive:(UIApplication *)application {\n [pulsateSystemManager applicationDidBecomeActive:application];\n}\n\n-(void)applicationWillEnterForeground:(UIApplication *)application\n{\n [pulsateSystemManager applicationWillEnterForeground:application];\n}\n\n-(void)applicationDidEnterBackground:(UIApplication *)application\n{\n [pulsateSystemManager applicationDidEnterBackground:application];\n}\n\n- (void)applicationWillResignActive:(UIApplication *)application {\n [pulsateSystemManager applicationWillResignActive:application];\n}\n\n- (void)applicationWillTerminate:(UIApplication *)application {\n [pulsateSystemManager applicationWillTerminate:application];\n}", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {\n pulsateSystemManager?.application!(application, didRegisterForRemoteNotificationsWithDeviceToken: deviceToken);\n}\n \nfunc application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {\n pulsateSystemManager?.application!(application, didFailToRegisterForRemoteNotificationsWithError: error);\n}\n \nfunc application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {\n pulsateSystemManager?.application!(application, didReceiveRemoteNotification: userInfo);\n}\n \nfunc applicationWillResignActive(_ application: UIApplication) {\n pulsateSystemManager?.applicationWillResignActive!(application)\n}\n \nfunc applicationDidEnterBackground(_ application: UIApplication) {\n pulsateSystemManager?.applicationDidEnterBackground!(application)\n}\n \nfunc applicationWillEnterForeground(_ application: UIApplication) {\n pulsateSystemManager?.applicationWillEnterForeground!(application)\n}\n \nfunc applicationDidBecomeActive(_ application: UIApplication) {\n pulsateSystemManager?.applicationDidBecomeActive!(application)\n}\n \nfunc applicationWillTerminate(_ application: UIApplication) {\n pulsateSystemManager?.applicationWillTerminate!(application)\n}", "language": "swift" } ] } [/block] [block:api-header] { "title": "4. UNUserNotificationCenterDelegate callbacks" } [/block] [block:code] { "codes": [ { "code": "- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler\n{\n\tNSDictionary *userInfo = response.notification.request.content.userInfo;\n if ([userInfo[@\"sender\"] isKindOfClass:[NSString class]]) {\n \tNSString *sender = userInfo[@\"sender\"];\n if ([sender isEqualToString:@\"Pulsate\"]) {\n \t// Pulsate was the sender of the push, let Pulsate handle the Push\n [pulsateSystemManager userNotificationCenter:center didReceiveNotificationResponse:response withCompletionHandler:completionHandler];\n return;\n }\n }\n\n\t// Pulsate was not the sender of the push, handle it manually\n completionHandler();\n}\n\n- (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler\n{\n\tNSDictionary *userInfo = notification.request.content.userInfo;\n\n\tif ([userInfo[@\"sender\"] isKindOfClass:[NSString class]]) {\n \tNSString *sender = userInfo[@\"sender\"];\n \tif ([sender isEqualToString:@\"Pulsate\"]) {\n \t// Pulsate was the sender of the push, let Pulsate handle the Push\n [pulsateSystemManager userNotificationCenter:center willPresentNotification:notification withCompletionHandler:completionHandler];\n return;\n }\n\t}\n\n // Pulsate was not the sender of the push, handle it manually\n completionHandler(UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionSound);\n}", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void)\n{\n let userInfo = notification.request.content.userInfo\n if (userInfo[\"sender\"] is String) {\n let sender = userInfo[\"sender\"] as? String\n if (sender == \"Pulsate\") {\n // Pulsate was the sender of the push, let Pulsate handle the Push\n pulsateSystemManager?.userNotificationCenter!(center, willPresent: notification, withCompletionHandler: completionHandler)\n return\n }\n } \n // Pulsate was not the sender of the push, handle it manually\n completionHandler([.alert, .badge, .sound])\n}\n \nfunc userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {\n let userInfo = response.notification.request.content.userInfo\n if (userInfo[\"sender\"] is String) {\n let sender = userInfo[\"sender\"] as? String\n if (sender == \"Pulsate\") {\n // Pulsate was the sender of the push, let Pulsate handle the Push\n pulsateSystemManager?.userNotificationCenter!(center, didReceive: response, withCompletionHandler: completionHandler)\n return\n }\n }\n completionHandler()\n} ", "language": "swift" } ] } [/block] [block:callout] { "type": "danger", "title": "UNUserNotificationCenterDelegate with Deployment Target below iOS 10", "body": "If your deployment target is below iOS 10 you can not use the UNUserNotificationCenterDelegate as a global variable, it is only available in iOS 10 and above. Instead use the pulsateManager to give you the pulsateSystemManager variable when needed. Example: pulsateManager?.getPulsateSystemManager().userNotificationCenter!(center, didReceive: response, withCompletionHandler: completionHandler)" } [/block]