QuickBlox Developers (API docs, code samples, SDK)

How to create APNS certificates

From QuickBlox Developers (API docs, code samples, SDK)
Jump to: navigation, search


Contents

Creating an App ID

Each iOS 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. Log in to the iPhone Developer Connection Portal
  2. Click on the iOS Provisioning Portal on the right of the page:
  3. Ios-dev-center-apple-developer.png

  4. You should see the welcome page:
  5. IOS dev center home page.png

  6. Click on the App IDs tab on the left and then click on the New App ID button:
  7. App-ids-ios-provisioning-portal-apple-developer.png

  8. Enter your app name for the Description. Enter Bundle Identifier. Ensure you have created an App ID without a wildcard. Wildcard IDs cannot use the push notification service. For example, our iOS application ID looks something like com.quickblox.messagestest. Click Submit:
  9. Add-app-ids-ios-provisioning-portal-apple-developer.png

  10. You should now see the App ID that you have created:
  11. CreatedAppID.png

Generating a Certificate Request

You must generate a certificate request file so that you can use it to request for a development SSL certificate later on.

  1. Launch the Keychain Access application in your Mac OS X:
  2. Keychainaccess.png

  3. Select Keychain Access -> Certificate Assistant -> Request a Certificate From a Certificate Authority:
  4. Request sert.png

  5. Enter the information required and check the 'Saved to disk' option. Click Continue:
  6. Savesert.png

  7. Save the certificate request using the suggested name and click Save. Click Done in the next screen:
  8. Savesertdesktope.png

  9. The same process above applies when generating the production certificate.

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:
  2. ConfigureAppID.png

  3. You will now see the option. Check the 'Enable for Apple Push Notification service' option and click the 'Configure' button displayed to the right of the Development Push SSL Certificate:
  4. Enable APNS for app.png

  5. A wizard will appear. Click Continue:
  6. Apn quide1.png

  7. Click the Choose File button to locate the Certificate Request file that you have saved earlier (Generating a Certificate Request section). Click Generate:
  8. Apn quide2.png

  9. Your SSL Certificate will now be generated. Click Continue:
  10. Apn quide3.png

  11. Click Done:
  12. Apn quide4.png

  13. The same process above applies when generating the production certificate.

Make APNS certificates

  1. Now you can download certificate:
  2. APN enabled.png

  3. The SSL Certificate that you download is named aps_developer_identity.cer. Double-click on it to install it in the Keychain Access application. The SSL certificate will be used by your provider application so that it can contact the APNs to send push notifications to your applications.
  4. Launch Keychain Assistant from your local Mac and from the 'login' keychain, filter by the 'Certificates' category. You will see an expandable option called “Apple Development iOS Push Services”:
  5. New certs.png

  6. Expand this option then right click on “Apple Development iOS Push Services” -> Export “Apple Development iOS Push Services ...″. Save this as apns-dev-cert.p12 file somewhere you can access it.
  7. Enter the password for exporting (it can be an empty):

    Enter the password for exporting.png

    Enter your usual admin password for your computer to confirm and finalize the export process:

    File-Enter your usual admin password.png

  8. The same process above applies when generating the production certificate.

Upload certificate to Admin panel

Thats all! Now you can upload APNS certificates to Messages module in QuickBlox Admin panel.

  1. Go to Messages module
  2. Messages module.jpg

  3. Switch to Settings tab
  4. Messages module settings tab.jpg

  5. Upload your certificate

Create provision profile

  1. Click on the Provisioning tab on the left and then click on the New Profile button:
  2. Provisioning.png

  3. Fill Profile name field, check Certificates, choose App ID, select your devices and click Submit:
  4. CreateProvision1.png

  5. You will see Pending status on your newly created provision profile
  6. Pending.png

  7. Just refresh page and you will see Download button. Click on it.
  8. Download.png

  9. Provision profile will be downloaded to your hard disk.Double click on it
  10. HereISProvision.png

  11. Open your application in Xcode, go to Project structure, select *.plist file and write your Bundle identifier that you type on Step 1
  12. SetAppID.png

  13. Go to Project Settings, choose your Target, choose Code Signing and select your Provision Profile
  14. SetProvision.png

  15. Now just run application! Thats all.

Comments

Feel free to comment on this page using the form below.

blog comments powered by Disqus
Go up