{"__v":18,"_id":"5743fa43e6c03d0e00355c20","category":{"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","_id":"57a9ce2fac6db30e000d7efd","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-08-09T12:35:59.736Z","from_sync":false,"order":5,"slug":"push-messages","title":"Push messages"},"parentDoc":null,"project":"54eb50e5615ffc1900305a16","user":"54eb4fdedf7add210007b29b","version":{"__v":18,"_id":"54eb63b859b1172100334fae","forked_from":"54eb63a1867e1917009b711d","project":"54eb50e5615ffc1900305a16","createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-05-24T06:52:51.415Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":4,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Creating an Explicit App ID\"\n}\n[/block]\nIn order to support Push Notifications, each application should have it's own Explicit App ID. As a standard, the applications is represented by reversed address (ex. com.example.MyApp).\n\n**Can I use my existing App ID?** If you have already configured an App ID for your app, double check that it was set up as an Explicit App ID. Wildcard App IDs cannot support push notifications and they are easy to identify: the last character in the bundle identifier is an asterisk (*). Wildcard App IDs cannot be converted to Explicit App IDs, but setting up a new App ID for your app is quite straightforward.\n\nThe following instructions cover the creation of a new Explicit App ID.\n\n1. Navigate to the [Apple Developer Member Center](https://developer.apple.com/membercenter/index.action) website, and click on [Certificates, IDs & Profiles](https://developer.apple.com/account/ios/certificate).\n\n2. Select [App IDs](https://developer.apple.com/account/ios/identifier/bundle) under the Identifier section.\n\n3. You will see a list of your App IDs. Select the + button to register a new App Id.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/RVvdXdYmSaqVka4cpRop_IOS_certificates.png\",\n        \"IOS_certificates.png\",\n        \"996\",\n        \"483\",\n        \"#685140\",\n        \"\"\n      ],\n      \"sizing\": \"80\"\n    }\n  ]\n}\n[/block]\n4. Enter a name for your new App ID under App ID Description.\n\n5. Choose an App ID Prefix. The default selection should be correct in most cases.\n\n6. Under App ID Suffix, select Explicit App ID. Enter your iOS app's Bundle ID. This string should match the Bundle Identifier in your Xcode project configuration or Info.plist file.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9EbqMGYjRqaV4C1jPZwu_ios_registeringappid.png\",\n        \"ios_registeringappid.png\",\n        \"658\",\n        \"1005\",\n        \"#3e8ccc\",\n        \"\"\n      ],\n      \"sizing\": \"80\",\n      \"border\": false\n    }\n  ]\n}\n[/block]\n7. Enable Push Notifications under App Services. You may also enable any other services that your app will need at this point.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ykRJQU1jRgCDBsdcGFuk_ios_app_services.png\",\n        \"ios_app_services.png\",\n        \"621\",\n        \"599\",\n        \"#f46d07\",\n        \"\"\n      ],\n      \"sizing\": \"80\"\n    }\n  ]\n}\n[/block]\n8. Select  **`Continue`** and make sure that all the values were entered correctly. Push Notifications should be enabled, and the Identifier field should match your app's Bundle Identifier (plus App ID Prefix). Select **`Submit`** to finalize the registration of your new App ID.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Configuring your App ID for Push Notifications\"\n}\n[/block]\nNow that you've created a new App ID (or chosen an existing Explicit App ID), it's time to configure the App ID for Push Notifications.\n\n1. Select your newly created App ID from the list of App IDs, then select **`Edit`**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/fRLHwGXpSNuqoXjp8cpr_ios_configure_app.png\",\n        \"ios_configure_app.png\",\n        \"721\",\n        \"774\",\n        \"#26507f\",\n        \"\"\n      ],\n      \"sizing\": \"80\"\n    }\n  ]\n}\n[/block]\n2. Scroll down to the Push Notifications section. Here you will be able to create both a Development SSL Certificate, as well as a Production SSL Certificate. Start by selecting  **`Create Certificate`** under  **\"Development SSL Certificate\"**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/rUVP3mhVQkGDCDrsw37z_ios_push_notifications.png\",\n        \"ios_push_notifications.png\",\n        \"675\",\n        \"401\",\n        \"#d86516\",\n        \"\"\n      ],\n      \"sizing\": \"80\"\n    }\n  ]\n}\n[/block]\n3. Follow the instructions in the next screen to create a Certificate Signing Request (CSR) using the Keychain Access utility on your Mac. This will be used to authenticate the creation of the SSL certificate.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ppWhsRTSRhMn2a4EylmI_ios_certificate.png\",\n        \"ios_certificate.png\",\n        \"842\",\n        \"553\",\n        \"#c15b18\",\n        \"\"\n      ],\n      \"sizing\": \"80\"\n    }\n  ]\n}\n[/block]\n4. Locate the CSR and upload it to Apple's servers, then click on **`Generate`**. Once the certificate is ready, download the generated SSL certificate to your computer.\n\n5. Double click on the downloaded SSL certificate to add it to your login keychain.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/eEvTgB3cSh6JK1eGjx2M_ios_add_certifocate.png\",\n        \"ios_add_certifocate.png\",\n        \"536\",\n        \"302\",\n        \"#2e5d93\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n6. Open the Keychain Access utility, and locate the certificate you just added under **\"My Certificates\"**. It should be called **\"Apple Development Push Services: \"** if it is a development certificate, or **\"Apple Push Services: \"** if it is a production certificate.\n\n7. Right-click on it, select **`Export`**, and save it as a .p12 file. You will be prompted to enter a password which will be used to protect the exported certificate. Do not enter an export password when prompted! Leave both fields blank and click OK. You will then be asked to enter your OS X account password to allow Keychain Access to export the certificate from your keychain on the next screen. Enter your OS X password and click on Allow.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/qEtLbUJ2STW85QgMWUUt_ios_keychain.png\",\n        \"ios_keychain.png\",\n        \"761\",\n        \"365\",\n        \"#33578b\",\n        \"\"\n      ],\n      \"sizing\": \"80\"\n    }\n  ]\n}\n[/block]\nIf the Personal Information Exchange (.p12) option is grayed out in the export sheet, make sure **`My Certificates`** is selected in Keychain Access. If that does not help, double check that your certificate appears under the login keychain. You can drag and drop it into login if needed.\n\nYou have just enabled Push Notification for your app in development mode. Prior to releasing your application on the App Store, you will need to repeat steps 1 through 7 of this section, but select **`Production Push SSL Certificate`** in step 2 instead. You may reuse the CSR from step 3.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Creating the Development Provisioning Profile\"\n}\n[/block]\nA Provisioning Profile authenticates your device to run the app you are developing. Whether you have created a new App ID or modified an existing one, you will need to regenerate your provisioning profile and install it. If you have trouble using an existing profile, try removing the App ID and setting it back. For purposes of this tutorial, we'll create a new profile.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note\",\n  \"body\": \"Prior to submitting your app to the App Store, you will need to test push notifications in production\"\n}\n[/block]\n1. Navigate to the [Apple Developer Member Center](https://developer.apple.com/membercenter/index.action) website, and select [Certificates, IDs & Profiles](https://developer.apple.com/account/ios/certificate/).\n\n2. Select [All](https://developer.apple.com/account/ios/profile/) under **\"Provisioning Profiles\"**.\n\n3. Select the **`+`** button to create a new Provisioning Profile.\n\n4. Choose **\"iOS App Development\"** (or **\"Mac App Development\"**) as your provisioning profile type then select **`Continue`**. We will create Ad Hoc and App Store profiles later.\n\n5. Choose the Explicit App ID you created in Section 1 from the drop down then select **`Continue`**.\n\n6. Make sure to select your Development certificate in the next screen, then select **`Continue`**. If you do not have one, this is a good time to create a new **\"iOS App Development\"** (or **\"Mac App Development\"**) certificate.\n\n7. You will be asked to select which devices will be included in the provisioning profile. Select **`Continue`** after selecting the devices you will be using to test push notifications during development.\n\n8. Choose a name for this provisioning profile, such as **\"My App Development Profile\"**, then select **`Generate`**.\n\n9. Download the generated provisioning profile from the next screen by selecting the **`Download`** button.\n\n10. Add the profile to Xcode by double-clicking on the downloaded file.\n\n------ \n### **Next:** [Create PUSH application](doc:push-introduction-create-app)","excerpt":"This page will provide You info how to activate and configure APNS cloud.","slug":"apns-setup","type":"basic","title":"APNS Certificate Setup Guide"}

APNS Certificate Setup Guide

This page will provide You info how to activate and configure APNS cloud.

[block:api-header] { "type": "basic", "title": "Creating an Explicit App ID" } [/block] In order to support Push Notifications, each application should have it's own Explicit App ID. As a standard, the applications is represented by reversed address (ex. com.example.MyApp). **Can I use my existing App ID?** If you have already configured an App ID for your app, double check that it was set up as an Explicit App ID. Wildcard App IDs cannot support push notifications and they are easy to identify: the last character in the bundle identifier is an asterisk (*). Wildcard App IDs cannot be converted to Explicit App IDs, but setting up a new App ID for your app is quite straightforward. The following instructions cover the creation of a new Explicit App ID. 1. Navigate to the [Apple Developer Member Center](https://developer.apple.com/membercenter/index.action) website, and click on [Certificates, IDs & Profiles](https://developer.apple.com/account/ios/certificate). 2. Select [App IDs](https://developer.apple.com/account/ios/identifier/bundle) under the Identifier section. 3. You will see a list of your App IDs. Select the + button to register a new App Id. [block:image] { "images": [ { "image": [ "https://files.readme.io/RVvdXdYmSaqVka4cpRop_IOS_certificates.png", "IOS_certificates.png", "996", "483", "#685140", "" ], "sizing": "80" } ] } [/block] 4. Enter a name for your new App ID under App ID Description. 5. Choose an App ID Prefix. The default selection should be correct in most cases. 6. Under App ID Suffix, select Explicit App ID. Enter your iOS app's Bundle ID. This string should match the Bundle Identifier in your Xcode project configuration or Info.plist file. [block:image] { "images": [ { "image": [ "https://files.readme.io/9EbqMGYjRqaV4C1jPZwu_ios_registeringappid.png", "ios_registeringappid.png", "658", "1005", "#3e8ccc", "" ], "sizing": "80", "border": false } ] } [/block] 7. Enable Push Notifications under App Services. You may also enable any other services that your app will need at this point. [block:image] { "images": [ { "image": [ "https://files.readme.io/ykRJQU1jRgCDBsdcGFuk_ios_app_services.png", "ios_app_services.png", "621", "599", "#f46d07", "" ], "sizing": "80" } ] } [/block] 8. Select **`Continue`** and make sure that all the values were entered correctly. Push Notifications should be enabled, and the Identifier field should match your app's Bundle Identifier (plus App ID Prefix). Select **`Submit`** to finalize the registration of your new App ID. [block:api-header] { "type": "basic", "title": "Configuring your App ID for Push Notifications" } [/block] Now that you've created a new App ID (or chosen an existing Explicit App ID), it's time to configure the App ID for Push Notifications. 1. Select your newly created App ID from the list of App IDs, then select **`Edit`**. [block:image] { "images": [ { "image": [ "https://files.readme.io/fRLHwGXpSNuqoXjp8cpr_ios_configure_app.png", "ios_configure_app.png", "721", "774", "#26507f", "" ], "sizing": "80" } ] } [/block] 2. Scroll down to the Push Notifications section. Here you will be able to create both a Development SSL Certificate, as well as a Production SSL Certificate. Start by selecting **`Create Certificate`** under **"Development SSL Certificate"**. [block:image] { "images": [ { "image": [ "https://files.readme.io/rUVP3mhVQkGDCDrsw37z_ios_push_notifications.png", "ios_push_notifications.png", "675", "401", "#d86516", "" ], "sizing": "80" } ] } [/block] 3. Follow the instructions in the next screen to create a Certificate Signing Request (CSR) using the Keychain Access utility on your Mac. This will be used to authenticate the creation of the SSL certificate. [block:image] { "images": [ { "image": [ "https://files.readme.io/ppWhsRTSRhMn2a4EylmI_ios_certificate.png", "ios_certificate.png", "842", "553", "#c15b18", "" ], "sizing": "80" } ] } [/block] 4. Locate the CSR and upload it to Apple's servers, then click on **`Generate`**. Once the certificate is ready, download the generated SSL certificate to your computer. 5. Double click on the downloaded SSL certificate to add it to your login keychain. [block:image] { "images": [ { "image": [ "https://files.readme.io/eEvTgB3cSh6JK1eGjx2M_ios_add_certifocate.png", "ios_add_certifocate.png", "536", "302", "#2e5d93", "" ] } ] } [/block] 6. Open the Keychain Access utility, and locate the certificate you just added under **"My Certificates"**. It should be called **"Apple Development Push Services: "** if it is a development certificate, or **"Apple Push Services: "** if it is a production certificate. 7. Right-click on it, select **`Export`**, and save it as a .p12 file. You will be prompted to enter a password which will be used to protect the exported certificate. Do not enter an export password when prompted! Leave both fields blank and click OK. You will then be asked to enter your OS X account password to allow Keychain Access to export the certificate from your keychain on the next screen. Enter your OS X password and click on Allow. [block:image] { "images": [ { "image": [ "https://files.readme.io/qEtLbUJ2STW85QgMWUUt_ios_keychain.png", "ios_keychain.png", "761", "365", "#33578b", "" ], "sizing": "80" } ] } [/block] If the Personal Information Exchange (.p12) option is grayed out in the export sheet, make sure **`My Certificates`** is selected in Keychain Access. If that does not help, double check that your certificate appears under the login keychain. You can drag and drop it into login if needed. You have just enabled Push Notification for your app in development mode. Prior to releasing your application on the App Store, you will need to repeat steps 1 through 7 of this section, but select **`Production Push SSL Certificate`** in step 2 instead. You may reuse the CSR from step 3. [block:api-header] { "type": "basic", "title": "Creating the Development Provisioning Profile" } [/block] A Provisioning Profile authenticates your device to run the app you are developing. Whether you have created a new App ID or modified an existing one, you will need to regenerate your provisioning profile and install it. If you have trouble using an existing profile, try removing the App ID and setting it back. For purposes of this tutorial, we'll create a new profile. [block:callout] { "type": "info", "title": "Note", "body": "Prior to submitting your app to the App Store, you will need to test push notifications in production" } [/block] 1. Navigate to the [Apple Developer Member Center](https://developer.apple.com/membercenter/index.action) website, and select [Certificates, IDs & Profiles](https://developer.apple.com/account/ios/certificate/). 2. Select [All](https://developer.apple.com/account/ios/profile/) under **"Provisioning Profiles"**. 3. Select the **`+`** button to create a new Provisioning Profile. 4. Choose **"iOS App Development"** (or **"Mac App Development"**) as your provisioning profile type then select **`Continue`**. We will create Ad Hoc and App Store profiles later. 5. Choose the Explicit App ID you created in Section 1 from the drop down then select **`Continue`**. 6. Make sure to select your Development certificate in the next screen, then select **`Continue`**. If you do not have one, this is a good time to create a new **"iOS App Development"** (or **"Mac App Development"**) certificate. 7. You will be asked to select which devices will be included in the provisioning profile. Select **`Continue`** after selecting the devices you will be using to test push notifications during development. 8. Choose a name for this provisioning profile, such as **"My App Development Profile"**, then select **`Generate`**. 9. Download the generated provisioning profile from the next screen by selecting the **`Download`** button. 10. Add the profile to Xcode by double-clicking on the downloaded file. ------ ### **Next:** [Create PUSH application](doc:push-introduction-create-app)