{"__v":0,"_id":"57961400287f330e000fb524","category":{"__v":11,"_id":"55a589ddaaf9cf1900114dd0","pages":["55a590d580c8a30d00b32404","55a5915680c8a30d00b3240a","55a5917a0f354f0d00fd0345","55a5921d80c8a30d00b32413","55a5a5cb80c8a30d00b32448","55a5b03880c8a30d00b32458","55a611a0249a40190051d928","55a611ec80c8a30d00b32502","55a612ae249a40190051d92d","55a612faaaf9cf1900114f1f","55a911aa27a17d210052523f"],"project":"559a61d2dbcfd20d00710b39","version":"559a61d2dbcfd20d00710b3c","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-14T22:14:53.033Z","from_sync":false,"order":1,"slug":"ios-sdk","title":"iOS SDK"},"parentDoc":null,"project":"559a61d2dbcfd20d00710b39","user":"559a618bdbcfd20d00710b38","version":{"__v":23,"_id":"559a61d2dbcfd20d00710b3c","project":"559a61d2dbcfd20d00710b39","createdAt":"2015-07-06T11:09:06.510Z","releaseDate":"2015-07-06T11:09:06.510Z","categories":["559a61d3dbcfd20d00710b3d","55a589ddaaf9cf1900114dd0","55a589e30f354f0d00fd0312","55a589ea80c8a30d00b323cc","55a589f6aaf9cf1900114dd1","55a58d4e80c8a30d00b323e6","55a8e7a227a17d21005251a2","55a93098cf45e1390093f351","55afb085f202b12100cd9e83","55afb22e902fd51700f5f8bf","55afb260902fd51700f5f8c2","55afb28ec8a85321007a5462","55afb294f202b12100cd9e95","55afb29b902fd51700f5f8c5","55afb2a1c8a85321007a5463","55afb2a7902fd51700f5f8c7","55afb2ad902fd51700f5f8c8","55afb2b5902fd51700f5f8ca","55b74b2131bccb190081bedc","55bb441b54f9640d006e6cf2","565711085cb2420d00d70071","5681681330018c0d006bf7ff","588f38b5923d610f00c72dad"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-07-25T13:28:32.384Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"MOCA Platform uses [Apple Push Notification Service](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html) (APNS) to deliver notifications to your iOS users. Please bear in mind this is only for remote push notifications, and **this is not mandatory for location based notifications** (Proximity Experiences).\n\n\n###Before starting\n\nIn order to get the certificates and upload them to MOCA, you will need:\n\n- A membership in the [Apple iOS developer program](https://developer.apple.com/programs/)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Enable Remote Push Notifications on your App ID\"\n}\n[/block]\n- Sign in to your account in the [Apple developer center](https://developer.apple.com/account/\n), and then go to **Certificates, Identifiers & Profiles**\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/444df5c-CertsIdentiProfs.png\",\n        \"CertsIdentiProfs.png\",\n        707,\n        298,\n        \"#fbfbfb\"\n      ]\n    }\n  ]\n}\n[/block]\n- Each App should have an App ID, click the App ID that corresponds to your App (or create it if you have not already done so). In any case, ensure that the Push Notifications service is enabled.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/6a1106c-APNS_on.png\",\n        \"APNS_on.png\",\n        635,\n        696,\n        \"#3f4241\"\n      ]\n    }\n  ]\n}\n[/block]\n- Click on the `Development` or `Production` certificate button and follow the steps.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exporting certificates\"\n}\n[/block]\n- Open the `KeyChain Access` App of your Mac, there you will find the certificates that you downloaded in the previous step.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"This application may have different names depending on your Mac language configuration:\",\n  \"body\": \"Català: “Accés a clauers”\\nEspañol: \\\"Acceso a llaveros\\\"\\nFrançais: \\\"Trousseau d'accès\\\"\\nPortuguês: \\\"Acesso às Chaves\\\"\"\n}\n[/block]\n- Right click on the certificate, and select \"Export ....\". Select the `p12` format and create a password for the file, do not lose this password as you will need it a next step.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/462ecb2-keychain_access.png\",\n        \"keychain_access.png\",\n        662,\n        364,\n        \"#eeeeed\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Production vs Development\",\n  \"body\": \"Ensure that the App in MOCA Console is pointing to the right servers. Production certificates won't work for Development apps and vice versa.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Warning\",\n  \"body\": \"Do not submit Apps to Apple with Development certificates.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Uploading the certificates to MOCA Console\"\n}\n[/block]\n- Login in to your MOCA Account, and go to Apps **>** *app_to_be_configured* ** >** Settings **>** Services\n- Upload the file using the Add button in the \"APNS\" section, you will need the password you created in a previous step.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/791a0f6-APNS_upload.png\",\n        \"APNS_upload.png\",\n        778,\n        669,\n        \"#efefed\"\n      ]\n    }\n  ]\n}\n[/block]\n- All done. You can now start sending notifications to your users using MOCA Platform.","excerpt":"","slug":"remote-push-notifications-apns-setup","type":"basic","title":"APNS: Certificates for push notifications"}

APNS: Certificates for push notifications


MOCA Platform uses [Apple Push Notification Service](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html) (APNS) to deliver notifications to your iOS users. Please bear in mind this is only for remote push notifications, and **this is not mandatory for location based notifications** (Proximity Experiences). ###Before starting In order to get the certificates and upload them to MOCA, you will need: - A membership in the [Apple iOS developer program](https://developer.apple.com/programs/) [block:api-header] { "type": "basic", "title": "Enable Remote Push Notifications on your App ID" } [/block] - Sign in to your account in the [Apple developer center](https://developer.apple.com/account/ ), and then go to **Certificates, Identifiers & Profiles** [block:image] { "images": [ { "image": [ "https://files.readme.io/444df5c-CertsIdentiProfs.png", "CertsIdentiProfs.png", 707, 298, "#fbfbfb" ] } ] } [/block] - Each App should have an App ID, click the App ID that corresponds to your App (or create it if you have not already done so). In any case, ensure that the Push Notifications service is enabled. [block:image] { "images": [ { "image": [ "https://files.readme.io/6a1106c-APNS_on.png", "APNS_on.png", 635, 696, "#3f4241" ] } ] } [/block] - Click on the `Development` or `Production` certificate button and follow the steps. [block:api-header] { "type": "basic", "title": "Exporting certificates" } [/block] - Open the `KeyChain Access` App of your Mac, there you will find the certificates that you downloaded in the previous step. [block:callout] { "type": "info", "title": "This application may have different names depending on your Mac language configuration:", "body": "Català: “Accés a clauers”\nEspañol: \"Acceso a llaveros\"\nFrançais: \"Trousseau d'accès\"\nPortuguês: \"Acesso às Chaves\"" } [/block] - Right click on the certificate, and select "Export ....". Select the `p12` format and create a password for the file, do not lose this password as you will need it a next step. [block:image] { "images": [ { "image": [ "https://files.readme.io/462ecb2-keychain_access.png", "keychain_access.png", 662, 364, "#eeeeed" ] } ] } [/block] [block:callout] { "type": "danger", "title": "Production vs Development", "body": "Ensure that the App in MOCA Console is pointing to the right servers. Production certificates won't work for Development apps and vice versa." } [/block] [block:callout] { "type": "warning", "title": "Warning", "body": "Do not submit Apps to Apple with Development certificates." } [/block] [block:api-header] { "type": "basic", "title": "Uploading the certificates to MOCA Console" } [/block] - Login in to your MOCA Account, and go to Apps **>** *app_to_be_configured* ** >** Settings **>** Services - Upload the file using the Add button in the "APNS" section, you will need the password you created in a previous step. [block:image] { "images": [ { "image": [ "https://files.readme.io/791a0f6-APNS_upload.png", "APNS_upload.png", 778, 669, "#efefed" ] } ] } [/block] - All done. You can now start sending notifications to your users using MOCA Platform.