Hi,
I have seen in several places that push notification could wake up app and put it in background but I am not sure if it is possible to do the same if the app is not running.
What I am using is:
UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound|UIUserNotificationActivationModeBackground|UIUserNotificationActivationModeForeground categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings];
[[UIApplication sharedApplication] registerForRemoteNotifications];To register push notification. And :
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
DDLogVerbose(@"Remote notification :%@ ", userInfo);
}I am using this for payload to the apns
:{ aps = { "content-available" = 1; "alert" = ""; }; }I also have enabled push notification in background but I am not able to do the system receive silent push notification when the app is not running.