{"_id":"5850651f9d4f700f00e9dba6","githubsync":"","project":"56cecbdb44c5700b0095c03a","version":{"_id":"56cecbdc44c5700b0095c03d","project":"56cecbdb44c5700b0095c03a","__v":10,"createdAt":"2016-02-25T09:39:40.121Z","releaseDate":"2016-02-25T09:39:40.121Z","categories":["56cecbdc44c5700b0095c03e","56d1d2c05ad7ad0b00b7e809","56d1d2fa5ad7ad0b00b7e80a","56d369331660770b00081159","56d3693d1660770b0008115a","56e5361e7990160e002e3fbc","56e5362775eb791700a9c4d2","57a9030947f2f419009188d4","57b4705ee9e4c60e00f6f4c3","5828f5b04774ab0f005179a2"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"56d3693d1660770b0008115a","pages":["56e51ce64ddf0b0e004afbbc","56e51d092d90970e00af1b1a","56e69b0c00ea361700d4fa78","56ea7bdfcf35bf0e00adb91d"],"version":"56cecbdc44c5700b0095c03d","__v":4,"project":"56cecbdb44c5700b0095c03a","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-28T21:40:13.300Z","from_sync":false,"order":2,"slug":"ios","title":"iOS"},"user":"56cecbb2e50c9c1b008303eb","parentDoc":null,"__v":0,"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-12-13T21:16:15.973Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"We strongly recommend to set your APNS credentials in the PushApps Admin Console, before integrating the PushApps SDK.  [Please check our guide for that.](doc:setup-your-push-notifications-credentials)\",\n  \"title\": \"Before you begin...\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Add PushApps SDK To Your Project\"\n}\n[/block]\n1.1 Download the [PushApps SDK](https://s3.amazonaws.com/pushapps-sdk/ios/PushApps.framework.zip) and unzip it.\n\n1.2 In your Xcode project, go to `Link Binary With Libraries` section and click the `+` button. Click on `Add Other` and navigate to the downloaded folder. Choose the `PushApps.framework` file.\n\n1.3 In the Capabilities tab:\n* Enable Push Notifications:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/1748d25-Screen_Shot_2016-11-09_at_19.51.11.png\",\n        \"Screen Shot 2016-11-09 at 19.51.11.png\",\n        1414,\n        472,\n        \"#d8d8d6\"\n      ]\n    }\n  ]\n}\n[/block]\n<br><br>* Enable Background Modes and check Background fetch and Remote notifications:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/56f25bb-Screen_Shot_2016-12-13_at_16.52.10.png\",\n        \"Screen Shot 2016-12-13 at 16.52.10.png\",\n        1864,\n        750,\n        \"#223856\"\n      ]\n    }\n  ]\n}\n[/block]\n<br><br>* Enable App Groups, click on the + sign and add your unique app group name (e.g. `group.mobi.pushapps.sdk`:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/7534f63-Screen_Shot_2016-12-13_at_16.52.21.png\",\n        \"Screen Shot 2016-12-13 at 16.52.21.png\",\n        1848,\n        260,\n        \"#1b4478\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"App Groups\",\n  \"body\": \"PushApps is using the app group capability, in order to share data between your app and the notification extensions. Please notice that app groups name is unique, per Apple account.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"2. Update Project Settings\"\n}\n[/block]\n2.1 If your on iOS 9 or above, Add the domain `pushapps.mobi` to your `NSExceptionDomains` dictionary, according to the image below:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/OXR0UdotRm2EoOYSgm2u_Screen%20Shot%202016-04-07%20at%2010.27.52%20AM.png\",\n        \"Screen Shot 2016-04-07 at 10.27.52 AM.png\",\n        \"786\",\n        \"132\",\n        \"#913d2d\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n2.2 Add the following URL Scheme into your info.plist file. Don't forget to replace <YOUR-SDK-KEY> with your \"real\" PushApps SDK key for your app.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"pushapps-<YOUR-SDK-KEY>\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/CDD0Q0DcSDWZvytkOmDa_Screen%20Shot%202016-05-29%20at%205.40.31%20PM.png\",\n        \"Screen Shot 2016-05-29 at 5.40.31 PM.png\",\n        \"762\",\n        \"164\",\n        \"#8e3e27\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Using Advertisement Id\",\n  \"body\": \"PushApps will check if your project contains the AdSupport.framework and will use the advertisement id for all it's requests. If no, the vendor identifier will be use.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"3. Add Some Code\"\n}\n[/block]\n3.1 Inside your AppDelegate.m add the following lines to your imports list:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#import <PushApps/PushApps.h>\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n3.2. At the end of your `didFinishLaunchingWithOptions` method, add the following line (don't forget to replace the string <YOUR-SDK-KEY>  with your SDK key):\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\\n{\\n    [PushApps registerDeviceWithSdkKey::::at:::\\\"<YOUR-SDK-KEY>\\\" andAppGroupsName:@\\\"<YOUR-APP-GROUPS-NAME>\\\" withNotificationClickHandler:^(NSDictionary *contentInfo) {\\n        NSLog(@\\\"contentInfo: %@\\\", contentInfo);\\n    }];\\n    [PushApps registerForPushNotifications:launchOptions];\\n\\n    return YES;\\n}\\n\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n3.3 Add the following methods, in your AppDelegate.m:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#pragma mark - PushApps\\n\\n- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken\\n{\\n    NSLog(@\\\"application:didRegisterForRemoteNotificationsWithDeviceToken: %@\\\", deviceToken);\\n    [PushApps setDevicePushToken:deviceToken];\\n}\\n\\n- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error\\n{\\n    NSLog(@\\\"application:didFailToRegisterForRemoteNotificationsWithError: %@\\\", error);\\n    [PushApps failedToRegisterToPushNotificationsWithError:error];\\n}\\n\\n// iOS9 and below support\\n- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {\\n    NSLog(@\\\"application:didRegisterUserNotificationSettings: %@\\\", notificationSettings);\\n    [application registerForRemoteNotifications];\\n}\\n\\n// iOS9 and below support\\n- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {\\n    NSLog(@\\\"didReceiveRemoteNotification\\\");\\n}\\n\\n// iOS9 and below support\\n- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options\\n{\\n    [PushApps handleOpenUrl:url withOpenBrowserBlock:^{\\n        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@\\\"http://www.pushapps.mobi\\\"]];\\n    }];\\n    return YES;\\n}\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"4. iOS10 Rich Notifications\"\n}\n[/block]\nIn order to support iOS 10 rich notification, you'll need to add 2 different new targets to your project.\n\n4.1 Create new target of type \"Notification Service Extension\". Select the `Capabilities` tab, enable `app groups` and choose the same group you selected for your app.\n\n4.2 In the general settings for the new target, add PushApps.framework (select the copy that already exists in the project).\n\n4.3 In NotificationService.h import PushApps/PushApps.h and inherit from PANotificationServiceExtension instead of UNNotificationServiceExtension:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#import <PushApps/PushApps.h>\\n\\n@interface NotificationService : PANotificationServiceExtension\\n\\n@end\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n4.4 In NotificationService.m replace the content with the following:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"@implementation NotificationService\\n\\n- (instancetype)init\\n{\\n    self = [super init];\\n    if (self)\\n    {\\n        [self setPushAppsSdkKey:@\\\"<PUSHAPPS_SDK_KEY>\\\" andAppGroupName:@\\\"<YOUR-APP-GROUPS-NAME>\\\"];\\n    }\\n    return self;\\n}\\n\\n@end\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"class NotificationService: PANotificationServiceExtension {\\n\\n    required override init() {\\n                \\n        super.init()\\n        self.setPushAppsSdkKey(\\\"<PUSHAPPS_SDK_KEY>\\\", andAppGroupName: \\\"<YOUR-APP-GROUPS-NAME>\\\")\\n        \\n    }\\n\\n}\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n4.5 In the extension info.plist consider adding NSAppTransportSecurity section:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<key>NSAppTransportSecurity</key>\\n<dict>\\n  <key>NSAllowsArbitraryLoads</key>\\n  <true/>\\n</dict>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n4.6 Create a new target of type \"Notification Content\" and name it something like \"NotificationViewController\". Select the `Capabilities` tab, enable `app groups` and choose the same group you selected for your app.\n\n4.7 In the general settings for the new target, add PushApps.framework (select the copy that already exists in the project).\n\n4.8 In NotificationViewController.h import PushApps/PushApps.h and inherit from PANotificationContentExtension instead of UIViewController:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#import <PushApps/PushApps.h>\\n\\n@interface NotificationViewController : PANotificationContentExtension\\n\\n@end\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n4.9 In PANotificationContentExtension.m replace the content with the following:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"@implementation NotificationViewController\\n\\n- (instancetype)init\\n{\\n    self = [super init];\\n    if (self)\\n    {\\n        [self setPushAppsSdkKey:@\\\"<PUSHAPPS_SDK_KEY>\\\" andAppGroupName:@\\\"<YOUR-APP-GROUPS-NAME>\\\"];\\n    }\\n    return self;\\n}\\n\\n\\n@end\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"class NotificationViewController: PANotificationContentExtension {\\n    \\n    convenience init() {\\n        \\n        self.init(nibName: nil, bundle: nil)\\n        self.setPushAppsSdkKey(\\\"<PUSHAPPS_SDK_KEY>\\\", andAppGroupName: \\\"<YOUR-APP-GROUPS-NAME>\\\")\\n    }\\n\\n}\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n4.10 Delete the extension’s storyboard file.\n\n4.11 In info.plist replace the `NSExtensionAttributes` entry with:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<key>NSExtensionAttributes</key>\\n\\t\\t<dict>\\n\\t\\t\\t<key>UNNotificationExtensionDefaultContentHidden</key>\\n\\t\\t\\t<true/>\\n\\t\\t\\t<key>UNNotificationExtensionCategory</key>\\n\\t\\t\\t<array>\\n\\t\\t\\t\\t<string>pushapps</string>\\n\\t\\t\\t\\t<string>pushapps-recommendations</string>\\n\\t\\t\\t</array>\\n\\t\\t\\t<key>UNNotificationExtensionInitialContentSizeRatio</key>\\n\\t\\t\\t<integer>1</integer>\\n\\t\\t</dict>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\nand consider adding the NSAppTransportSecurity entry if needed:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<key>NSAppTransportSecurity</key>\\n<dict>\\n\\t<key>NSAllowsArbitraryLoads</key>\\n\\t<true/>\\n</dict>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"That's it!\",\n  \"body\": \"Try to compile your app with the right provision profile (otherwise you won't receive push notifications). In order to test your code, go to PushApps admin console and start sending notifications!\"\n}\n[/block]","excerpt":"","slug":"ios-sdk-installation","type":"basic","title":"iOS SDK Installation"}

iOS SDK Installation


[block:callout] { "type": "info", "body": "We strongly recommend to set your APNS credentials in the PushApps Admin Console, before integrating the PushApps SDK. [Please check our guide for that.](doc:setup-your-push-notifications-credentials)", "title": "Before you begin..." } [/block] [block:api-header] { "type": "basic", "title": "1. Add PushApps SDK To Your Project" } [/block] 1.1 Download the [PushApps SDK](https://s3.amazonaws.com/pushapps-sdk/ios/PushApps.framework.zip) and unzip it. 1.2 In your Xcode project, go to `Link Binary With Libraries` section and click the `+` button. Click on `Add Other` and navigate to the downloaded folder. Choose the `PushApps.framework` file. 1.3 In the Capabilities tab: * Enable Push Notifications: [block:image] { "images": [ { "image": [ "https://files.readme.io/1748d25-Screen_Shot_2016-11-09_at_19.51.11.png", "Screen Shot 2016-11-09 at 19.51.11.png", 1414, 472, "#d8d8d6" ] } ] } [/block] <br><br>* Enable Background Modes and check Background fetch and Remote notifications: [block:image] { "images": [ { "image": [ "https://files.readme.io/56f25bb-Screen_Shot_2016-12-13_at_16.52.10.png", "Screen Shot 2016-12-13 at 16.52.10.png", 1864, 750, "#223856" ] } ] } [/block] <br><br>* Enable App Groups, click on the + sign and add your unique app group name (e.g. `group.mobi.pushapps.sdk`: [block:image] { "images": [ { "image": [ "https://files.readme.io/7534f63-Screen_Shot_2016-12-13_at_16.52.21.png", "Screen Shot 2016-12-13 at 16.52.21.png", 1848, 260, "#1b4478" ] } ] } [/block] [block:callout] { "type": "warning", "title": "App Groups", "body": "PushApps is using the app group capability, in order to share data between your app and the notification extensions. Please notice that app groups name is unique, per Apple account." } [/block] [block:api-header] { "type": "basic", "title": "2. Update Project Settings" } [/block] 2.1 If your on iOS 9 or above, Add the domain `pushapps.mobi` to your `NSExceptionDomains` dictionary, according to the image below: [block:image] { "images": [ { "image": [ "https://files.readme.io/OXR0UdotRm2EoOYSgm2u_Screen%20Shot%202016-04-07%20at%2010.27.52%20AM.png", "Screen Shot 2016-04-07 at 10.27.52 AM.png", "786", "132", "#913d2d", "" ] } ] } [/block] 2.2 Add the following URL Scheme into your info.plist file. Don't forget to replace <YOUR-SDK-KEY> with your "real" PushApps SDK key for your app. [block:code] { "codes": [ { "code": "pushapps-<YOUR-SDK-KEY>", "language": "text" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/CDD0Q0DcSDWZvytkOmDa_Screen%20Shot%202016-05-29%20at%205.40.31%20PM.png", "Screen Shot 2016-05-29 at 5.40.31 PM.png", "762", "164", "#8e3e27", "" ] } ] } [/block] [block:callout] { "type": "warning", "title": "Using Advertisement Id", "body": "PushApps will check if your project contains the AdSupport.framework and will use the advertisement id for all it's requests. If no, the vendor identifier will be use." } [/block] [block:api-header] { "type": "basic", "title": "3. Add Some Code" } [/block] 3.1 Inside your AppDelegate.m add the following lines to your imports list: [block:code] { "codes": [ { "code": "#import <PushApps/PushApps.h>", "language": "objectivec" } ] } [/block] 3.2. At the end of your `didFinishLaunchingWithOptions` method, add the following line (don't forget to replace the string <YOUR-SDK-KEY> with your SDK key): [block:code] { "codes": [ { "code": "- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n [PushApps registerDeviceWithSdkKey:@\"<YOUR-SDK-KEY>\" andAppGroupsName:@\"<YOUR-APP-GROUPS-NAME>\" withNotificationClickHandler:^(NSDictionary *contentInfo) {\n NSLog(@\"contentInfo: %@\", contentInfo);\n }];\n [PushApps registerForPushNotifications:launchOptions];\n\n return YES;\n}\n", "language": "objectivec" } ] } [/block] 3.3 Add the following methods, in your AppDelegate.m: [block:code] { "codes": [ { "code": "#pragma mark - PushApps\n\n- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken\n{\n NSLog(@\"application:didRegisterForRemoteNotificationsWithDeviceToken: %@\", deviceToken);\n [PushApps setDevicePushToken:deviceToken];\n}\n\n- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error\n{\n NSLog(@\"application:didFailToRegisterForRemoteNotificationsWithError: %@\", error);\n [PushApps failedToRegisterToPushNotificationsWithError:error];\n}\n\n// iOS9 and below support\n- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {\n NSLog(@\"application:didRegisterUserNotificationSettings: %@\", notificationSettings);\n [application registerForRemoteNotifications];\n}\n\n// iOS9 and below support\n- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {\n NSLog(@\"didReceiveRemoteNotification\");\n}\n\n// iOS9 and below support\n- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options\n{\n [PushApps handleOpenUrl:url withOpenBrowserBlock:^{\n [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@\"http://www.pushapps.mobi\"]];\n }];\n return YES;\n}", "language": "objectivec" } ] } [/block] [block:api-header] { "type": "basic", "title": "4. iOS10 Rich Notifications" } [/block] In order to support iOS 10 rich notification, you'll need to add 2 different new targets to your project. 4.1 Create new target of type "Notification Service Extension". Select the `Capabilities` tab, enable `app groups` and choose the same group you selected for your app. 4.2 In the general settings for the new target, add PushApps.framework (select the copy that already exists in the project). 4.3 In NotificationService.h import PushApps/PushApps.h and inherit from PANotificationServiceExtension instead of UNNotificationServiceExtension: [block:code] { "codes": [ { "code": "#import <PushApps/PushApps.h>\n\n@interface NotificationService : PANotificationServiceExtension\n\n@end", "language": "objectivec" } ] } [/block] 4.4 In NotificationService.m replace the content with the following: [block:code] { "codes": [ { "code": "@implementation NotificationService\n\n- (instancetype)init\n{\n self = [super init];\n if (self)\n {\n [self setPushAppsSdkKey:@\"<PUSHAPPS_SDK_KEY>\" andAppGroupName:@\"<YOUR-APP-GROUPS-NAME>\"];\n }\n return self;\n}\n\n@end", "language": "objectivec" }, { "code": "class NotificationService: PANotificationServiceExtension {\n\n required override init() {\n \n super.init()\n self.setPushAppsSdkKey(\"<PUSHAPPS_SDK_KEY>\", andAppGroupName: \"<YOUR-APP-GROUPS-NAME>\")\n \n }\n\n}", "language": "swift" } ] } [/block] 4.5 In the extension info.plist consider adding NSAppTransportSecurity section: [block:code] { "codes": [ { "code": "<key>NSAppTransportSecurity</key>\n<dict>\n <key>NSAllowsArbitraryLoads</key>\n <true/>\n</dict>", "language": "xml" } ] } [/block] 4.6 Create a new target of type "Notification Content" and name it something like "NotificationViewController". Select the `Capabilities` tab, enable `app groups` and choose the same group you selected for your app. 4.7 In the general settings for the new target, add PushApps.framework (select the copy that already exists in the project). 4.8 In NotificationViewController.h import PushApps/PushApps.h and inherit from PANotificationContentExtension instead of UIViewController: [block:code] { "codes": [ { "code": "#import <PushApps/PushApps.h>\n\n@interface NotificationViewController : PANotificationContentExtension\n\n@end", "language": "objectivec" } ] } [/block] 4.9 In PANotificationContentExtension.m replace the content with the following: [block:code] { "codes": [ { "code": "@implementation NotificationViewController\n\n- (instancetype)init\n{\n self = [super init];\n if (self)\n {\n [self setPushAppsSdkKey:@\"<PUSHAPPS_SDK_KEY>\" andAppGroupName:@\"<YOUR-APP-GROUPS-NAME>\"];\n }\n return self;\n}\n\n\n@end", "language": "objectivec" }, { "code": "class NotificationViewController: PANotificationContentExtension {\n \n convenience init() {\n \n self.init(nibName: nil, bundle: nil)\n self.setPushAppsSdkKey(\"<PUSHAPPS_SDK_KEY>\", andAppGroupName: \"<YOUR-APP-GROUPS-NAME>\")\n }\n\n}", "language": "swift" } ] } [/block] 4.10 Delete the extension’s storyboard file. 4.11 In info.plist replace the `NSExtensionAttributes` entry with: [block:code] { "codes": [ { "code": "<key>NSExtensionAttributes</key>\n\t\t<dict>\n\t\t\t<key>UNNotificationExtensionDefaultContentHidden</key>\n\t\t\t<true/>\n\t\t\t<key>UNNotificationExtensionCategory</key>\n\t\t\t<array>\n\t\t\t\t<string>pushapps</string>\n\t\t\t\t<string>pushapps-recommendations</string>\n\t\t\t</array>\n\t\t\t<key>UNNotificationExtensionInitialContentSizeRatio</key>\n\t\t\t<integer>1</integer>\n\t\t</dict>", "language": "xml" } ] } [/block] and consider adding the NSAppTransportSecurity entry if needed: [block:code] { "codes": [ { "code": "<key>NSAppTransportSecurity</key>\n<dict>\n\t<key>NSAllowsArbitraryLoads</key>\n\t<true/>\n</dict>", "language": "xml" } ] } [/block] [block:callout] { "type": "success", "title": "That's it!", "body": "Try to compile your app with the right provision profile (otherwise you won't receive push notifications). In order to test your code, go to PushApps admin console and start sending notifications!" } [/block]