{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","params":[],"results":{"codes":[]},"apiSetting":null},"next":{"description":"","pages":[]},"title":"Testing Production Push Notifications","type":"basic","slug":"send-a-message","excerpt":"","body":"## Testing Push in Production\n\nFor testing production conditions, the steps are a little different. \n\n1. Edit your application's scheme in Xcode and run your application in **release** mode. This will mean that Apple will provide your app a production push token at runtime, and Sailthru Mobile will have a valid token when communicating with with Apple.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Choosing the correct distribution profile\",\n  \"body\": \"To deploy to your device, you'll need to be using either an **Ad-Hoc** or **Enterprise** distribution profile. Trying these steps with an **App Store** provisioning profile will not work, as the pushes will be rejected by Apple.\"\n}\n[/block]\n2. Refresh the device log, and your device should appear. \n\n3. Copy the Device ID.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Turn off development mode\",\n  \"body\": \"If your device was previously marked as development, turn this off before proceeding.\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/68sDiyTdQ7KLWg9Og0MQ_Screen%20Shot%202015-08-21%20at%203.06.25%20pm.png\",\n        \"Screen Shot 2015-08-21 at 3.06.25 pm.png\",\n        \"619\",\n        \"121\",\n        \"\",\n        \"\"\n      ],\n      \"caption\": \"Selecting the Device ID\"\n    }\n  ]\n}\n[/block]\n4. Create an Audience with this Device ID. This will be the audience you send messages to so they only go to **you** and not any other users. Navigate to Audiences, Create Audience. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/MRlGkBOTmqijdlqlvfs9_Screen%20Shot%202015-08-21%20at%203.07.05%20pm.png\",\n        \"Screen Shot 2015-08-21 at 3.07.05 pm.png\",\n        \"1205\",\n        \"648\",\n        \"\",\n        \"\"\n      ],\n      \"caption\": \"How to make an audience for just you.\"\n    }\n  ]\n}\n[/block]\n5. Navigate to Messages, Push, Create New. \n6. Select your Audience name you used above. \n7. Type in some test text, and click Preview, then Publish Now. \n\n**If you received the push, test is working correctly in production.**","updates":[],"order":3,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5e6156bf5e4a51006dcd8147","githubsync":"","parentDoc":null,"project":"55e67aaa9cc7c62b00c4a1ea","user":"55d2bd8e2463351700f67dd7","__v":8,"category":{"sync":{"isSync":false,"url":""},"pages":["5e6156bf5e4a51006dcd812a","5e6156bf5e4a51006dcd812c","5e6156bf5e4a51006dcd812d","5e6156bf5e4a51006dcd812e","55e682b7de6fef23009480dc","5e6156bf5e4a51006dcd812f","5e6156bf5e4a51006dcd8130","5e6156bf5e4a51006dcd8131","5e6156bf5e4a51006dcd8132","5e6156bf5e4a51006dcd8133","5e6156bf5e4a51006dcd8134","5b720760c44b7600034b79bc","5e6156bf5e4a51006dcd8135","5e6156bf5e4a51006dcd8148","5e6156bf5e4a51006dcd8149","5e6156bf5e4a51006dcd814a","5e6156bf5e4a51006dcd814b","5e6156bf5e4a51006dcd814c","5e6156bf5e4a51006dcd814f","5e6156bf5e4a51006dcd8150","5e6156bf5e4a51006dcd8152","561c6ca0be5fb20d00077754","5e6156bf5e4a51006dcd8157","5e6156bf5e4a51006dcd8158","5b720760c44b7600034b79e2","5e6156bf5e4a51006dcd8159","5e6156bf5e4a51006dcd815a","5e6156bf5e4a51006dcd815b","5e6156bf5e4a51006dcd815c","56cfa5386c5d7a13005eec0f","56e73d86555c030e00a52a73","56e7460c9000b120000ffe2e","56e8c19e99c6400e003820cf","56e8c53fc88bf80e00f8bed8","56f06ff4d386ce0e008e9b21"],"title":"Install in your app","slug":"install-in-your-app","order":1,"from_sync":false,"reference":false,"_id":"5e6156bf5e4a51006dcd8121","__v":35,"createdAt":"2015-09-02T04:30:13.305Z","project":"55e67aaa9cc7c62b00c4a1ea","version":"5e6156bf5e4a51006dcd818c"},"createdAt":"2015-09-08T04:37:46.428Z","version":{"version":"1.5","version_clean":"1.5.0","codename":"ST Rebrand","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5e6156bf5e4a51006dcd8120","5e6156bf5e4a51006dcd8121","5e6156bf5e4a51006dcd8122","5e6156bf5e4a51006dcd8123","5e6156bf5e4a51006dcd8124","561c61b4ad272c0d00a892df","586c014c0abf1d0f000d04d4","58991d2ad207df0f0002186b","5e6156bf5e4a51006dcd8125","5e6156bf5e4a51006dcd8126","5af0fe494ca2730003cbc98a","5af0fe55ec80af0003804ca2","5e69868cbd5dcb006b35867b","5e6986ca2c6652006791b6e8"],"_id":"5e6156bf5e4a51006dcd818c","project":"55e67aaa9cc7c62b00c4a1ea","__v":2,"forked_from":"5b720760c44b7600034b7a08","createdAt":"2015-09-02T04:27:23.612Z","releaseDate":"2015-09-02T04:27:23.612Z"}}

Testing Production Push Notifications


## Testing Push in Production For testing production conditions, the steps are a little different. 1. Edit your application's scheme in Xcode and run your application in **release** mode. This will mean that Apple will provide your app a production push token at runtime, and Sailthru Mobile will have a valid token when communicating with with Apple. [block:callout] { "type": "warning", "title": "Choosing the correct distribution profile", "body": "To deploy to your device, you'll need to be using either an **Ad-Hoc** or **Enterprise** distribution profile. Trying these steps with an **App Store** provisioning profile will not work, as the pushes will be rejected by Apple." } [/block] 2. Refresh the device log, and your device should appear. 3. Copy the Device ID. [block:callout] { "type": "danger", "title": "Turn off development mode", "body": "If your device was previously marked as development, turn this off before proceeding." } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/68sDiyTdQ7KLWg9Og0MQ_Screen%20Shot%202015-08-21%20at%203.06.25%20pm.png", "Screen Shot 2015-08-21 at 3.06.25 pm.png", "619", "121", "", "" ], "caption": "Selecting the Device ID" } ] } [/block] 4. Create an Audience with this Device ID. This will be the audience you send messages to so they only go to **you** and not any other users. Navigate to Audiences, Create Audience. [block:image] { "images": [ { "image": [ "https://files.readme.io/MRlGkBOTmqijdlqlvfs9_Screen%20Shot%202015-08-21%20at%203.07.05%20pm.png", "Screen Shot 2015-08-21 at 3.07.05 pm.png", "1205", "648", "", "" ], "caption": "How to make an audience for just you." } ] } [/block] 5. Navigate to Messages, Push, Create New. 6. Select your Audience name you used above. 7. Type in some test text, and click Preview, then Publish Now. **If you received the push, test is working correctly in production.**