Gluon CloudLink » Google Cloud Messaging
iOS Push Notifications
There are two main steps required to enable push notifications on iOS devices: First, get a valid p12 certificate, that will be required by the Dashboard, and second, get a valid provisioning profile to sign the app that will receive the notifications.
In both cases you need a valid account in the Apple Developer portal. More information about iOS notifications can be found here.
Certificate p12
Go to the Apple Developer portal, sign in with your credentials, and create a certificate for your app following these steps:
-
Select Certificates, Identifiers and Profiles
-
Under Identifiers → App IDs, click the
+
button to register your app.-
Under App ID Description: provide a valid name, i.e:
Push Notes App
. -
Under App ID Prefix: you should see your team ID.
-
Under Explicit App ID, Bundle ID: you have to put the exact same bundle of your app as the one you’ll find in the info.plist file, i.e:
com.gluonhq.pushnotes.PushNotes
.
-
-
Under App Services, select push notifications and click Continue.
-
Confirm you App ID: make sure your App ID information is correct, and click the Register button.
-
Registration complete. Click Done.
-
Under Identifiers → App IDs, now the created app ID it will be listed. Click on it, and at the end of the expanded info click on the Edit button.
-
Go to the Push Notifications section and click on Create Certificate for develpment, production or both.
-
Follow the instructions on how to generate a Certificate Signing Request (CSR) file on your Mac.
-
Open Keychain Access app and select Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority.
-
Add your email, name, select Save to disk, click continue.
-
Save the file, i.e.
CSR_PushNotes.certSigningRequest
.
-
-
Upload the CSR file
-
At the Developer center again, click on Continue, click on the Choose File… button, and submit your file.
-
-
Download the certificate
aps_development.cer
and double click on it to install the certificate in Keychain Access.
-
Once Keychain Access shows the certificate, expand it, select it and your name, and right click, selecting
Export 2 items
, and save the file on your disk, i.e.PushNotes_Certificate.p12
providing a password for it.
-
Important note: This file and the password will be required later on the push notifications configuration tab of the Gluon Dashboard.
Provisioning profile
One last step is required to be able to sign your app: get a provisioning profile for it.
-
Back again to the Apple Developer Center, under Provisioning Profiles (Development or Distribution), click on the
+
button to add a new profile.-
Select iOS App Development or App Store, and press Continue.
-
Select the App ID from the combobox, and press Continue.
-
-
Select the certificates you wish to include in this provisioning profile, and press Continue. These will be used later (
iosSignIdentity
). -
Select the devices you wish to include in this provisioning profile, and press Continue.
-
Give a name to the profile, and press Continue
-
The provisioning profile is ready to be downloaded.
-
Build and sign your application using this profile. See iOS configuration.