Newer Version Available

This content describes an older version of this product. View Latest

Step 1. Developer Registration with Mobile OS Vendors

This step asks the OS vendor to be prepared to handle Salesforce push notifications sent to your app. Developer registration also provides some information you’ll need to finish configuring your Salesforce connected app.

To register your mobile client app, follow the process for your target mobile OS.

Android Registration

When developing an Android app that supports push notifications, remember these key points:

  • You must be a member of the Android Developer Program.
  • You can test GCM push services only on an Android device with either the Android Market app or Google Play Services installed. Push notifications don’t work on an Android emulator.

Salesforce sends push notifications to Android apps through the Google Cloud Messaging for Android (GCM) framework. See http://developer.android.com/google/gcm/index.html for an overview of this framework.

To begin, create a Google API project for your app. Your project must have the GCM for Android feature enabled. See http://developer.android.com/google/gcm/gs.html for instructions on setting up your project.

The setup process for your Google API project creates a key for your app. Once you’ve finished the project configuration, you’ll need to add the Key for Server Applications (API Key) from GCM to your connected app settings.

Push notification registration occurs at the end of the OAuth login flow. Therefore, an app does not receive push notifications unless and until the user logs into a Salesforce org.

Note

iOS Registration

When developing an iOS app that supports push notifications, remember these key points:

  • You must be a member of the iOS Developer Program.
  • You can test Apple push services only on an iOS physical device. Push notifications don’t work in the iOS simulator.
  • There are no guarantees that all push notifications will reach the target device, even if the notification is accepted by Apple.
  • Apple Push Notification Services setup requires the use of the OpenSSL command line utility provided in Mac OS X.

Before you can complete registration on the Salesforce side, you need to register with Apple Push Notification Services (APNS).

Registration with APNS requires the following items.
Certificate Signing Request (CSR) File
Generate this request using the Keychain Access feature in Mac OS X. You’ll also use OpenSSL to export the CSR private key to a file for later use.
App ID from iOS Developer Program
In the iOS Developer Member Center, create an ID for your app, then use the CSR file to generate a certificate. Next, use OpenSSL to combine this certificate with the private key file to create an appkey.p12 file. You’ll need this file later to configure your connected app.
iOS Provisioning Profile
From the iOS Developer Member Center, create a new provisioning profile using your iOS app ID and developer certificate. You then select the devices to include in the profile and download to create the provisioning profile. You can then add the profile to Xcode. Install the profile on your test device using Xcode's Organizer.

When you’ve completed the configuration, sign and build your app in Xcode. Check the build logs to verify that the app is using the correct provisioning profile. To view the content of your provisioning profile, run the following command at the Terminal window: security cms -D -i <your profile>.mobileprovision