APNS (Apple Push Notification Service) reliability
Our app uses APNS to receive Push Notifications. However, our client claims that some of their devices were not receiving notifications and argues to they ‘must’ make sure the notifications to be delivered 100%. But I have read somewhere that APNS is not 100% reliable and there should be cases which the notifications are not delivered.
I’m currently panic at how we could make sure APNS to received anytime. I have read that a case which may APNS not delivered (device may offline). But our test showing that even the device is online (Wifi or 3G), sometimes APNS were not delivered.
Is there any specific case which may APNS will not delivered? Or is there anything we (developers) can do with codes to make sure to receive all notifications? What I have done in the code is just registering the app to remote notification and write didRegisterForRemoteNotificationsWithDeviceToken, then throw the device token to our server.
Any help would be appreciated, for our client almost kill us if ALL of their devices not receiving APNS!
- iOS not receiving notifications from Firebase Cloud Messaging
- FCM Push notifications do not work on iOS 11
- Push Notification -didFinishLaunchingWithOptions
- How to run an iOS application every 1 minute infinitely?
- application:didReceiveRemoteNotification:fetchCompletionHandler: not in UIApplicateStateBackground when called
- Registering for Push Notifications in Xcode 8/Swift 3.0?
3 Solutions Collect From Internet About “APNS (Apple Push Notification Service) reliability”
- APNS is based on Apple Servers, and Apple doesn’t give any guarantee on successful message delivery.
- If the app is open (i.e. the user is using the app) while the notification arrives, iOS doesnt show a notification message, you need to handle it.
- Notification shows up only when the app is backgrounded or killed.
- Also implement feedback service on your server side; will help you get rid of old unwanted tokens(users who deleted the app or disabled notifications thru settings).
- Dont send too many notifications to a device within a short span of time, coz APNS caches only 1 message/device (if the device is offline). So it can deliver the message when the device comes online. Am not sure how long the message is cached though.
Or just implement Pusher… http://pusher.com
We’re facing the same problem. As everybody said, APNS is a best effort service so you can’t be sure every notification will be delivered, but what you can do is to be sure of which ones have been received. This is what we’re about to do. We register in our backend each notification que ship and the mobile app reports back each notification it receives. Then we set a maximum time of waiting for a notification to be received, if we don’t receive the report back we try again.
I hope it might be helpful to someone (even 2 years later)
It says it quite clearly in the Apple Docs that it is not 100% gauranteed and nor should it be used as so. Its sent with “best effort”.
- How to get iOS device MAC address programmatically
- GCDAsyncSocket background VOIP
- Can I detect if screen is regular or compact from code on iOS 8?
- Difference between NSArray.array/.new /@/alloc-init
- How do I run a C++ program in XCode 4?
- iOS reverse audio through AVAssetWriter
- UITableView Cell – Edit?
- c++ thread-local storage clang-503.0.40 (Mac OSX)
- xcode All-in-one layout: keyboard shortcut to switch between project and debug page?
- checking reachability against a specific page in a URL
- Objective-C – Comparing integers not working as expected
- NSPredicate: filtering objects by day of NSDate property
- Back button not made on navigation bar
- 3D Touch Peek and Pop from UITableViewCell how to hand over data to other UIViewController?
- XCode 7.0.1, Bots, and Server 5.0.4: Test target “xx” encountered an error – Timed out waiting 120 seconds for simulator to boot