Push notifications not received in some devices in iOS - ios

I am implementing the push notification in iOS for sending offers and deals. Right now I am working in the development environment. I see that some of the devices are not being notified. Could anybody explain possible causes? I have also read that if a push is sent to same device multiple times then APPLE disables them for that particular device? Could some one verify this or provide any documentation where I can find the issue. Any feedback would be appreciated.

Not directly answering your question, but what you asked about in the comments and an alternative. You could use a push-notification service such as Parse.
They allow you to send Push Notifications to Web, iOS and Android, also offer data storage and backend infrastructure. The best thing about Parse is that they're free. Unless you have one million unique recipients, which is rather hard to accomplish. Parsee allows you tons end Push Notifications in multiple ways, some including automatic messages based on their tables or other events. You can program those in their cloud code. You can do so using their REST API or their Java Script API if you have a website. You could also send from the Push window on their website.
Setting up is fairly easy. I'll give you the most important links below.
iOS Quick Start Guide
Rest API
PHP Guide
Hope that helps, Julian

If you are dependent on APNS then there is no guarantee provided regarding the delivery of the push notification. And regarding sending multiple notifications. Like if you send notification every min then many may not deliver. Else it will. This service is free and many including myself using it on a regular basis. It has been delivered regularly even though apple will not provide any guarantee. i'm using a php script on server side to send push notification. Refer the below link if you want to know how to send a push notification using php.
tutorial

Related

Best way to implement push notifications with Firebase

I am an iPhone app coder, and I'm using Firebase as my backend server. Firebase doesn't support Push Notifications, so I've been trying to figure out how to include them in my app. I've read this question: How to send an alert message to a special online user with firebase but it seems like more of a work-around than an actual solution.
Is there an answer on how to do this? Are there third parties or APIs that might seemlessly implement this functionality?
One solution I have tried is to use Zapier to connect Firebase to Pushover.
At this point, I've been able to observe events in the app that I'm coding and then get notifications in a pushover app on my iphone. However, ideally, I'd like to receive the notifications in my app, not in the pushover app, because I don't want users to need to have pushover in order to use my app and because I want users to receive their own distinct notifications, not notifications for everyone.
Does anyone have suggestions on how I should handle this issue?
Thanks for the help!
EDIT
This isn't a duplicate of this question: Does firebase handle push notifications? because I know Firebase doesn't directly handle push notifications. I'm looking for the best indirect way of handling push notifications with Firebase.
Now Google rebranded GCM to Firebase Cloud Messaging and it now offers this cross platform service. Firebase also offers notifications.
These are the differences between these two services:
Firebase Cloud Messaging provides a complete set of messaging
capabilities through its client SDKs and HTTP and XMPP server
protocols. For deployments with more complex messaging requirements,
FCM is the right choice.
Firebase Notifications is a lightweight, serverless messaging solution
built on Firebase Cloud Messaging. With a user-friendly graphical
console and reduced coding requirements, Firebase Notifications lets
users easily send messages to reengage and retain users, foster app
growth, and support marketing campaigns.
If you want a more detailed comparison. Read this.
If you want device to device push messages and not just server to device, the only solution I found was OneSignal. I was able to add basic device to device push message support for my app in about an hour and it is currently free.
Both Batch and Firebase only support server to device push messages, not what you want for a chat app
There are a couple of options: (well, more than a couple but here's two)
Parse handles push notifications very very well - they have that down pat and it's super simple. However, you may have issues with users and accounts - depending on what your app does.
You mentioned Pushover. We worked their API a while back but not through Zapier. If I remember correctly, I believe you can simply register your app, send an HTTPS: request to their server and then the notifications are sent from/to your app.
Also, you may want to evaluate how you are using push as it's possible you can roll a notification-like event just into the app itself.
Here's the answer I got from the Firebase team:
Firebase currently does not have push notification feature. You can use Firebase Queue and GCM to implement push notification in your app. Queues can be used in your Firebase app to organize workers or perform background work like generating thumbnails of images, filtering message contents and censoring data, or fanning data out to multiple locations in your Firebase database. Google Cloud Messaging (GCM) is a free service that enables developers to send messages between servers and client apps and it is available in both iOS and Android.
You can push an object with some data to the /queue/tasks location in your Firebase using any Firebase client or the REST API. Workers listening at that location will automatically pick up and process the job. From that, your workers can make a GCM push notification.
(end of message from Firebase team)
~~~~~~~~~
Here's my analysis:
It seems like there are a few solutions, but the two best ones are:
1) Use FirebaseQueue with Google Cloud Messaging.
2) Leverage the Push Notification functionality in Parse within the Firebase app.
I'm not sure which is better. Parse seems more proven, but Firebase Queue is more-easily integrated into the app (ie. it's nice have everything on Firebase and not having to set up a Parse app)
Anyways, I hope this thread helps out other people!
Just realized that they've come out this:
Batch
Firebase now has Notifications inbuilt.
https://firebase.google.com/docs/notifications/
I had the same problem and managed to figure out a solution a while back. I have detailed my solution in the following posts https://stackoverflow.com/a/44192515/7048719 and https://stackoverflow.com/a/42240984/7048719
You have to create a firebase data service class and use a shared instance to hold the observers in memory when the app goes into background. From there it is just a matter doing what you wish.

iOS communication with backend using APNs

How do I send push notifications to my iOS app? I need to send small messages even when the application is in the background or not running.Is there a simple tutorial. I searched a lot and only found third party solutions. Is there a direct way to access APNs, and if not which third party should I go for.
To send remote notifications, you need your own server that is authorized (you can grab a remote notification certificate from your developer account from developer.apple.com). Then you just follow Apple's API to send a notification to a specific device.
I followed a Ray Wenderlich guide a while back and found it useful.
However, you might not want to set up your own server and stuff. This is where third-party solutions come in. I've worked with Parse's push notification system and found that it is pretty easy to set up.

Looking for a suggestion for building an APN Server that stores data (token) in SQL

I originally used http://www.easyapns.com/ as a guide for building my backend and sending push notifications. However I quickly realized that this no longer works, and I'd love to find another solution that works similar.
Essentially I need to store the device and tokens on my backend, and send out push notifications to certain devices in the DB.
Any help is GREATLY appreciated
Thanks
If it's your only requirement, there are many services to do this without creating specific backend, like pusher, push robot, google push notification service, etc.... All take care of registration of the token.
If you need to create a specific backend, then it depends of the others requirements, but Web and Github are full of examples on this topic.

Amazon Simple Notification Service (SNS) for push notifications on iOS?

Amazon Web Services have an SDK for iOS which supports the Amazon Simple Notification Service (SNS).
Does this mean it would be possible to use SNS to send push notifications to a running iOS app? So for example you could make an real-time instant messaging app.
Is this right, or have I misunderstood what SNS does? It just seems to me that you would need to open a connection/socket in order to recieve push notifications from your server. How does the SDK actually work?
Update:
I've since asked this question on the AWS Mobile Development Forum: https://forums.aws.amazon.com/thread.jspa?threadID=81089&tstart=0
Apparently there is an article coming out (probably here: http://aws.amazon.com/articles/SDKs/iOS) shortly to explain everything.
Update 2
The article: http://aws.amazon.com/articles/9156883257507082
According to Apple documentation "Local notifications and push notifications are ways for an application that isn’t running in the foreground to let its users know it has information for them.".
So, technically speaking, any data, including notifications, received when the application is running in the foreground are not "Push Notifications" and can't be a reason for rejecting the application. They're simply data being consumed that way or the other by the application.
In this specific case you are not asking about Push Notifications per Apple's documentation, rather about a technology used to deliver data to the application when the application is running and user is interacting with it. It happens that the name Amazon SNS is similar to Push Notification.
In any case Apple wouldn't be able to see what is the technology behind delivering data to your application, whether it is Amazon SNS or anything else. All they can see is that the application may have some additional ports open when it's running, and that of course would be absolutely legal. In fact, many applications communicate with their back-end servers using sockets (not HTTP requests), and that is the same technology as used by Apple to deliver their Push Notifications.
According to the Amazon documentation, they in turn uses the APNS method and provide a much simpler frontend for Apple, Android and Kindle. A realtime instant messaging app could be considered as workable since by using the Amazon SNS platform, you could even consider the application to be available for all.
I mean by utilizing the Amazon SNS, the communication could be done between iOS and Android devices and to kindle also provided the applications are written accordingly. Though the Amazon documents do not provide a comprehensive example, there are bits and pieces. Also there is an upcoming event on the Aug 29 which could be seen from the Amazon SNS page.

Blackberry push notification tutorial

I have registered with RIM for the push notification evaluation. But i cant find good sources for implementing push notifications. There are some samples in the sdk but i couldnt find out a way to implement them. So, i am looking for a good tutorial where i could find step by step implementation of push notification services...
RIM's samples for the server side involve setting up a web application container (e.g. Tomcat), setting up a backend database, and then building their Spring-based application. This sample web app handles things like device registration, content subscription, etc. and features a portal to manage everything.
The bare minimum that is required, though, is to send a WAP Push message which is just an HTTP POST to their Push Service servers. Here is a thread from the BlackBerry Support Forums that describes how to use their low-level PAP API to construct this message. Pay attention in particular to the messages by the user mdicesare.
There's also another SO question that has some tips.

Resources