Silent push notifications only delivered if device is charging and/or app is foreground

We have experienced the same behavior and have been trying to understand why iOS decides to deliver some notifications and not others. What we have worked out so far is: Messages will get received more reliably in background when on wifi than on cellular data. In fact, when on a cellular network (3g/4g), if your … Read more

It’s possible to change push notification message before display on device from iOS side?

There are various possibilities for preprocessing and modify the payload of a notification on iOS. Before iOS 10 You could be sending Silent Notifications, what will not be not shown to the user. Will wake our application when it is terminated or in background, and you will be able to do preprocessing on the notification … Read more

How can a web application send push notifications to iOS devices? [closed]

To be more specific, in order for a web application to send push notifications to a mobile device, such as the iPhone, the mobile device must have registered to receive push notifications for a particular application. The registration for push notification is done through a native app and can only be performed through a native … Read more

How can I convert my device token (NSData) into an NSString?

If anyone is looking for a way to do this in Swift: Swift 3 introduces the Data type, with value semantics. To convert the deviceToken to a String, you can do as follows: func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { let token = deviceToken.map { String(format: “%02.2hhx”, $0) }.joined() print(token) } Old answer using … Read more

Remote Notification iOS 8

Read the code in UIApplication.h. You will know how to do that. First: – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions add Code like this if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) { #ifdef __IPHONE_8_0 UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound) categories:nil]; [application registerUserNotificationSettings:settings]; #endif } else { UIRemoteNotificationType myTypes = UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound; [application registerForRemoteNotificationTypes:myTypes]; } … Read more

Objective-C – Detect when user change the app’s notifications settings

There is no delegate. You need to query the UIApplication property enabledRemoteNotificationTypes periodically, for example in applicationDidBecomeActive:. For details check these answers: Determine on iPhone if user has enabled push notifications View In Lock Screen and enabledRemoteNotificationTypes – iOS5 Edit: If you need to reset the push notification setting and the permission alert, have a … Read more