iPhone Configuration Guide

How to configure your application for iPhone

To configure Pushwoosh for your iOS application you will need the following:

  • Apple Push Notification Service (APNS) certificate
  • private key for the certificate
  • password for the private key

The process might look a bit complicated but actually it is not that hard to do.

1. Generating a Certificate Request

The first step to using the Push notifications is to generate a certificate request file that you can use to request a development SSL certificate later on.

1. Launch the Keychain Access application in your Mac OS X.

2. Select Keychain Access’Certificate Assistant’Request a Certificate From a Certificate Authority (see Figure 1):

Figure 1. Generating a certificate request

3. Enter the information required and check the Saved to disk option. Click Continue (see Figure 2).

Figure 2. Saving the certificate request to disk

4. Save the certificate request using the suggested name and click Save (see Figure 3): Click Done in the next screen.


Figure 3. Naming the certificate request

2. Creating an App ID.

If you have App ID ready, just skip to step “3. Configuring an App ID for Push Notifications”

Each iPhone applications that uses the APNs must have a unique application ID that uniquely identifies itself. In this step, you will learn how to create an App ID for push notification.

1. Sign in to the iOS Developer Center at: http://developer.apple.com/iphone/. Click on the iOS Provisioning Portal on the right of the page (see Figure 4).

Figure 4. Launching the iOS Provisioning Portal

2. You should see the welcome page (see Figure 5).

Figure 5. The welcome screen of the iOS Provisioning Portal

3. Click on the App IDs tab on the left and then click on the New App ID button (see Figure 6).

 

Figure 6. Clicking on the App ID tab

4. Enter “PushAppID” for the Description and select Generate New for the Bundle Seed ID. For the Bundle Identifier, com.arellomobile.MyPushApp. Click Submit (see Figure 7).

Figure 7. Creating a new App ID

5. You should now see the App ID that you have created (together with those you have previously created) (see Figure 8).

Figure 8. Viewing the newly created App ID

3. Configuring an App ID for Push Notifications

Once an App ID is created, you need to configure it for push notifications.

1. To configure an App ID for push notification, you need to click the Configure link displayed to the right of the App ID. You will now see the option (see Figure 9).

Figure 9. Configuring an App ID for push notification service

Check the Enable for Apple Push Notification service option and click the Configure button displayed to the right of the Development Push SSL Certificate.

2. You will now see the Apple Push Notification service SSL Certificate Assistant screen. Click Continue (see Figure 10).

Figure 10. The Apple Push Notification service SSL Certificate Assistant screen

3. Click the Choose File button to locate the Certificate Request file that you have saved earlier. Click Generate (see Figure 11).

Figure 11. Generating the SSL certificate

4. Your SSL Certificate will now be generated. Click Continue (see Figure 12).

Figure 12. The APNs SSL certificate that is generated

5. Click the Download Now button to download the SSL Certificate. Click Done (see Figure 13).

This is the first file your will need to upload to Pushwoosh

Figure 13. Downloading the certificate generated

6. The SSL Certificate that you download is named aps.developer.identity.cer. Double-click on it to install it in the Keychain Access application (see Figure 14). The SSL certificate will be used by your provider application so that it can contact the APNs to send push notifications to your applications.

Figure 14. Installing the generated certificate into the Keychain Access application

4. Exporting Private Key

1. Open up the Keychain Access Application and select the ‘Keys’ category.

Click on the private key associated with your iOS Development Certificate and click ‘Export Items’ in the menu (see Figure 15). The private key is identified by the iOS Developer: <First Name> <Last Name> public certificate that is paired with it and save your key in the Personal Information Exchange (.p12) file format.

You will be prompted to create a password, you will need to enter the same password on Pushwoosh configuration page.

This is the second file you need to upload to Pushwoosh. You also need to enter the same password you have used to create the Private Key (just few lines above)

Figure 15 Exporting Key file

8. To install the Certificate and Key for the application log in to your control panel on www.cp.pushwoosh.com, enter “My applications”, select the application, click on the “edit properties” icon in front of subscribers type (see Figure 16).

Figure 16 Clicking edit properties Icon to install the Certificate and Key

9. Check “Sandbox” in the bottom of the displayed text box. Download the certificate and key from your computer for the sandbox (development) environment and click “Submit” (see Figure 17).

 

Figure 17 Downloading Certificate and Key files

Check “Production” in the bottom and do the same as previous steps with the Certificate and Key for the production environment.

10. If you switch gateway for Pushwoosh from Sandbox to Production (for example), check “Production” in the bottom and upload the Certificate and Key for the production environment, don’t forget to check “This is a new certificate” in the bottom of the text box (see Figure 18) in order to clean up the old list of subscribers  (always check “This is a new certificate” when switching gateways or uploading new certificate). Do not check it ONLY when your existing certificate expired and you are uploading renewed one.

Figure 18 Switching gateway to Production