Skip to main content
sinious
Legend
November 7, 2012
Question

What's your preferred iOS Push provider? Any self built?

  • November 7, 2012
  • 2 replies
  • 904 views

Hey all,

Do you have a home grown push service or do you use an existing service like UrbanAirship?

I haven't touched Push yet but I'm going to start playing with it. I'm wondering how difficult the 3rd party server is to develop. In reading about the push it seems I need to keep a database of devices registered for a push. I then need to send my push to the APNS. What I'm wondering is if I really need to send a request for each device or if wildcards or app ids can be used to "globally" send a single push to all devices with the app.

I see AIR3.5 came out today and has a new event specifically for push (reading this article).

If you've created your own push service to work with APNS, how difficult was it to set up? Any common pitfalls? One I'd see, because I don't know what information my device will transmit on a token request, is how to know when the same device just has a different token. I'd want to purge any invalid tokens out so hopefully something like a unique ID is sent with that request.

Thanks for any tips and happy updating to 3.5!

This topic has been closed for replies.

2 replies

Adobe Employee
November 8, 2012

You need to send a request for each device id that has registered with you to receive push notifications.

When same device generates a new token, APNS sends an error for the previous token of this device. Once you receive such an error, you can remove the token altogether from your database. More details available here

http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW3

& http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html

sinious
siniousAuthor
Legend
November 8, 2012

Thanks for your reply!

Thanks for the article links. It's very in-depth. In everything I read (even with the code snippets provided (in bunny trail links off links off links)) I see them creating a function to send a notification to a specific device.

e.g. (obj-c):

static bool sendPayload(SSL *sslPtr, char *deviceTokenBinary, char *payloadBuff, size_t payloadLength) { .. }

What I don't see is a way to send a notification to all devices at once, unless I'm misinterperating that deviceTokenBinary as a compiled list of device tokens.

There was some mention of developing with wildcards in the article I mentioned. I had hoped this was going to lead to saying something like you can send notifications to an app ID or even all apps in an app IDs wildcard. However what I'm reading is very poised towards actally needing to send one notification per device.

So if I have 2 million installs, I literally need to send 2 million notifications? I must be missing something. Even with a persistent connection that would take forever if each message is pushed through one by one.

Am I missing a means of sending a list of devices all at once with a single notification? This is actually all I need. My app is a brochre. I simply wish to globally tell all devices when new materials are available in the brochure. I have no need to do this device-by-device. This doesn't seem possible though. Is that correct?