Push Notifications: iOS overview

Pusher’s Mobile Push Notifications API has first-class support for native iOS applications. Your iOS app instances subscribe to interests; then your servers send push notifications to those interests. Every app instance subscribed to that interest will receive the notification, even if the app is not open on the device at the time. This section describes how you can set up an iOS app to receive push notifications through Pusher.

The steps to getting Push Notifications working on iOS are:

  1. You register with APNs.
  2. APNs gives you a push certificate which you use to authenticate.
  3. You upload your push certificate to the Pusher dashboard.
  4. You create or configure an iOS app to use the Pusher client library.
  5. You configure your iOS app to subscribe to an interest when launched.
  6. You launch your iOS app. It subscribes to an interest.
  7. You use a Pusher server library to send a push notification to that interest.
  8. Your running iOS app receives the push notification!

This diagram highlights the systems involved in this process:

                                     +--------------------------------------+
                                     |                                      |
                                     |                                      |
    +----1.register------------------+            YOU/YOUR SERVER           |
    | +--2.certificate--------------->                                      |
    | |                              |                                      |
    | |                              +---------------+                      |
    | |                              | pusher server |                      |
    | |                              | library       |                      |
    | |                              +-------+-------+-------------+--------+
    | |                                      |                     |
    | |                                      |                     |
    | |                                 6.publish            3.certificate
    | |                                      |                     |
    | |                                      |                     |
    | |                              +-------v---------------------v--------+
    | |                              |                                      |
    | |                              |                                      |
+---v-+----+                         |                                      |
|          |                         |                                      |
|   APNs   <-----7.notification------+               PUSHER                 |
|          |                         |                                      |
+---+-^----+                         |                                      |
    | |                              |                                      |
    | |                              |                                      |
    | |                              +------------------^-------------------+
    | |                                                 |
    | |                                                 |
    | |                                       5.register/subscribe
    | |                                                 |
    | |                                                 |
    | |                                       +-------------------+
    | |                                       | +---------------+ |
    | +----4.register---------------------------+ pusher client | |
    +------8.notification-----------------------> library       | |
                                              | +---------------+ |
                                              |                   |
                                              |    YOUR USER'S    |
                                              |    IOS CLIENT     |
                                              |                   |
                                              +-------------------+

Our iOS guide is split into three sections, covering all stages of setting up your iOS app:

  1. Setting up APNs. This guides you through registering for a push certificate to use with APNs, and uploading that certificate to the Pusher dashboard.
  2. Making your iOS client. This guides you through adding the Pusher client library to your iOS app, getting the app to register with APNs and with Pusher, subscribing to interests, and receiving notifications.
  3. Pushing to your iOS client. This guides you through sending your first push notification to your iOS app, and then explains some more advanced options when sending notifications.

After that process, you may wish to set up an Android app for push notifications, too. You can then send to both iOS and Android apps at the same time, with a single push from your server.

Have you tried using the search to find what you’re after? If you still have a question then get in touch with us and let us help you out.