How to Send ios push notifications to multiple devices at once? - ios

Can I send multiple device tokens to APNS api in a single request?

I do not believe so. We use AWS SNS to handle that.

Related

Push Notifications without Apple Push Notification Service?

Can one use a 3rd party service to send Push Notifications without relying on the Apple Push Notification Service (APNS)?
If it is a requirement that one use the APNS service, is it simply a requirement for App Store approval or is it a technological limitation?
I have seen other questions, such as this one: Apple push notification without Apple Server, but it mainly deals with sending files and is several years old.
Apple requires you to use APNS to send push notifications to devices. This cannot be done without APNS, if you found a way around this then Apple would most likely reject the app.
Click here to read the documentation. When you register for push notifications you are actually getting the device token for your app on that specific device from APNS, therefore that is an APNS specific token and you will need to use APNS to send the notification.

iOS - Push Notification from iOS App to APNs without a server or third party

I'm looking for a way to send the payload for remote notification to the APNs from an iOS App. i'm pretty sure there's a way, but i'm not very good when it comes to communicating with a server and Json.
i've looked into NWPusher, swift Pusher and others. i couldn't find a clear instructions.
any help would be appropriate.
thanks
You need to store all token in a database then get all token in your app to send the notifications.
Is not possible to simply get all token of all devices using your app. Tokens must be store somewhere.
No you cannot do it. Push Notification is not meant be sent from your app.

How to get sent notification records from AWS SNS?

I'm working with AWS SNS API for mobile notification,
along with AWS CloudWatch for message monitoring.
There's currently only 5 metrics to be watched:
NumberOfMessagesPublished
PublishSize
NumberOfNotificationsDelivered
NumberOfNotificationsFailed
SMSSuccessRate
None of these seems to be like message content, recipient platforms, or delivered date/time. (contents that make more sense to marketers rather than developers)
How could I query the history of all my sent messages or a specific message?
SNS does not retain sent messages. You would have to archive the sent messages yourself as you send them.
One idea is to let SNS itself do the message archiving for you, so that you can then query the archive for the analytics that are relevant to you.
This can be done by subscribing a Kinesis Data Firehose to the SNS topic that you use for sending these mobile notifications. You can configure your Firehose stream to store the SNS notifications in S3, Redshift, Elasticsearch, Datadog, Splunk, New Relic, or MongoDB.
Check this out: https://aws.amazon.com/about-aws/whats-new/2021/01/amazon-sns-adds-support-for-message-archiving-and-analytics-via-kineses-data-firehose-subscriptions/
SNS is a wrapper around a number of similar notification APIs. The APIs for Apple (APNS) and Google (Most Android) GCN don't offer any kind of receipt confirmation.
If you need receipt confirmation you would have to build that into the application on the mobile device to inspect messages received that were for that application and there is no universal way to do that either. The other issue is that you are totally at the mercy of the user authorizing notifications.
I suggest you incorporate messaging of your own inside the app and have push notifications as an optional enhancement. In order to get badges to work right you also need cooperation with the app since there is no way using SNS to react to actions taken in the app to clear the notifications or adjust the badge value.

SIP server/provider with PushKit

I develop a SIP app in iOS and I would like to know if anybody have found a sip server that supports PushKit. It might be
an existing sip provider
an opensource sip server (eg asterisk) with this capability implemented
The SIP server doesn't need to support PushKit, this is something in iOS. There are 2 types of push notifications that the app can recognize and handle differently.
Through the Apple developers portal you will need to generate a certificate type of Voip Services. Use this and the token while pushing and in iOS register and lookout for these.
This site shows differences between push types: https://zeropush.com/guide/guide-to-pushkit-and-voip
Apples best practices for VoIP: https://developer.apple.com/library/ios/documentation/Performance/Conceptual/EnergyGuide-iOS/OptimizeVoIP.html
On your SIP server, you will just need to send a push notification on an incoming call. If you use Asterisk you can use AGI so you can perform the push in whichever language. I've always just use APNS but there's a bunch to choose from like AWS, Urban Airship, Onesignal.
Urbanship confirmed that they would not support voip push in the near future (at the end of 2016). Finally, I found I can just use houston to send voip push. From my experience sending voip push and apn push are just the same from our side, e.g. they send to the same apple server, so I guess apple server will differentiate them based on their tokens and give voip push a higher priority.

APNS Send notifications from multiple servers

I am writing an iOS application which will be sent notifications over APNS from backend servers.
Can I configure multiple servers to connect to APNS and send notifications? If so, is there a limit on the number of servers which can send notifications for a single application?
I can't find any details about this on the Apple site (e.g. http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html)
Yes, you can have multiple servers (Providers) connected to the APNS to send notifications to the same application, and no, there is no limit on how many. You just have to have the same APNS certificate on all of them.
Having multiple servers (providers) works well when sending notifications, the question is how to handle the Feedback service?
One server might query the feedback service, get a list of device tokens that have been removed but some tokens might be there from a push notification send from another server.

Resources