Alex Rivera | Logout

iOS push services: is an invisible push notification possible?

Asked 2012-01-03T17:48:36.270
19

I'm building a iPhone application which depends data from an online database.

To update the data in the app i could check at a certain time interval if an update is necessary but it is way cooler if i could use a push services which sends a notification to the app letting it know it is time for an update.

i'm not talking visible push notifications here, just a invisible push notification to fire the update method in my app.

Is there a standard way to do this or could i use apple's push notification services for this purpose ?

With other words: i'm now using pull to get updates, is there a push way to let the backend of my app know it is time for an update?

Edit: And if it is impossible, what would be good time interval for the update (0.03 kb if there are no updates). Is it to much to check it every 30 seconds ?

Edit
Report

1 Answer

29

There is a well explained documentation in the Apple Online Library.

With Apple Push Notification Service (APNS) you can get ANY combination of:

  • An alert message to display to the user
  • A number to badge the application icon with
  • A sound to play

When I say any I mean that no alert, no badge and no sound are also possible. Remote notifications are available even if the application is closed (but at least once executed, for register into the notification service), iOS has the debt of manage the push and wake up your application.

If you want to use APNS you need

  • a web server (will generate the push)
  • a CSR from the web server
  • an apple certificate trusting your server (this is the reason of CSR)
  • an iOS application with an App ID configured for Notifications

Everything related with CSR and trusting your server is detailed in the iOS provisioning portal, "App ID" section, "How to" tab. Try this link.

In your web server must be hosted the APNS provider who will do these two actions:

  • Register a token identifying a concrete installation on a concrete iOS device. This token is generated for the Apple APNS and will be sended to the Provider by your app. enter image description here

  • Generate push notifications: Will be sended from your provider to Apple APNS, an Apple APNS will delivery to your app (with an alert and/or badge and/or sound and/or silence mode) enter image description here

The APNS notification will be deli

answered 2012-01-21T00:29:01.813

Your Answer