{"__v":23,"_id":"55a9120acf45e1390093f2d0","category":{"__v":14,"_id":"5540d91bbb9e762d00f594ad","pages":["5540d9835cf9682100d61acc","5540d9f25cf9682100d61acf","55a3c52253611017004386bd","55a7744495bf6d25009a0505","55a8f59ac8bd450d000dd11f","55a8f945c8bd450d000dd128","55a8fb52c8bd450d000dd131","55a9046fc8bd450d000dd152","55a9094827a17d210052522a","55a90b6bcf45e1390093f2b8","55a90dd5c8bd450d000dd167","55a911afc8bd450d000dd179","55a9120acf45e1390093f2d0","55ba2eadb3612925009d670a"],"project":"5540ce1b31827a0d007ab1cc","version":"5540ce1c31827a0d007ab1cf","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-29T13:14:03.694Z","from_sync":false,"order":3,"slug":"ios","title":"iOS"},"parentDoc":null,"project":"5540ce1b31827a0d007ab1cc","user":"55a5003a750a9a23005332b6","version":{"__v":31,"_id":"5540ce1c31827a0d007ab1cf","project":"5540ce1b31827a0d007ab1cc","createdAt":"2015-04-29T12:27:08.390Z","releaseDate":"2015-04-29T12:27:08.390Z","categories":["5540ce1c31827a0d007ab1d0","5540d91bbb9e762d00f594ad","5540e5f131827a0d007ab212","5540e5febb9e762d00f594d3","5540e61331827a0d007ab213","5540e6195cf9682100d61afa","5540e62631827a0d007ab214","5540e63031827a0d007ab215","5540e63531827a0d007ab216","5540e63e5cf9682100d61afc","5540e6445cf9682100d61afd","5540e64a5cf9682100d61afe","55a4ff5b2e70c0250038050f","55acb28318eefd0d0071d504","55ae1abe8576b92300291c80","55ae453ef302af23000ac109","55af586d555b900d0036d296","55af91dac8a85321007a53c3","55b9fee204775a2f00628071","55b9ff0e04775a2f00628072","55b9ff4604775a2f00628073","55b9ff5fd72d1e1900276a38","55b9ff7f04775a2f00628074","55b9ff90eb08801900f833e5","55b9ffa5d72d1e1900276a39","55b9ffca04775a2f00628075","55b9fffdd72d1e1900276a3a","56bc2f033ee9e70d008b46af","56c2f6efbbf9ec2d00e0fe4f","57595bbb18760817001e8bbe","57d8d9793916800e003dde53"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-17T14:32:42.713Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"* [\"Your provisioning profile does not have APS entry\" error](http://docs.pushwoosh.com/docs/ios-faq#your-provisioning-profile-does-not-have-aps-entry-)\n* [What does iOS push token and HWID look like?](http://docs.pushwoosh.com/docs/ios-faq#what-does-ios-push-token-and-hwid-look-like)\n* [HWID changes every time app is opened when installed from TestFlight](http://docs.pushwoosh.com/docs/ios-faq#hwid-is-changing-every-times-app-open-when-install)\n* [How do I switch banner on and off when my app is running?](http://docs.pushwoosh.com/docs/ios-faq#how-to-switch-banner-on-and-off-when-my-app-is-run)\n* [How do I obtain my iOS device push token to use in Test Devices?](http://docs.pushwoosh.com/docs/ios-faq#how-do-i-obtain-my-ios-device-push-token-to-use-in) \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Troubleshooting\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"For load balancing purposes we may need to change the API endpoints in your application. This happens automatically and is handled by our SDK. **Please make sure that nothing in your app is blocking access to any URL containing *.pushwoosh.com.**\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"If you are behind Firewall or your WiFi router acts as a Firewall\\n\\nIf your device is connected to the Internet via WiFi, and messages don’t get through to the device, please **make sure APNs ports are not blocked by your firewall.**\\nPush providers, iOS devices, and Mac computers are often behind firewalls. To send notifications, you will need to allow inbound and outbound TCP packets over port 2195. Devices and computers connecting to push service over **Wi-Fi will need to allow inbound and outbound TCP packets over port 5223.**\\nThe IP address range for the push service can change; providers are expected to connect by hostname rather than IP address. Push service uses a load balancing scheme that yields a different IP address for the same hostname. However, the entire 17.0.0.0/8 address block is assigned to Apple, so you can specify that range in your firewall rules.\",\n  \"title\": \"If you are behind a Firewall or your WiFi router acts as a Firewall\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"\\\"Your provisioning profile does not have APS entry\\\" error\"\n}\n[/block]\nIf you see the \"Your provisioning profile does not have APS entry.\" error message, make sure your provisioning profile is push compatible and has the `aps-environment` string in it with the `production` or `development` value. The easiest way to check is to open the mobile provisioning profile in any text editor and look for the `aps-environment` string. It should be there.\n\nIf it is, and you keep receiving the error, it means that XCode still picks a \"non push-compatible\" profile. Please make sure you sign with the right one - sometimes if you have two profiles for the same App ID XCode messes things up and signs with the old one.\n\nThe recommended steps are:\n1. [Remove](http://stackoverflow.com/questions/18923095/delete-provisioning-profile-from-xcode-5) all XCode profiles;\n2. Add the one and only new profile;\n3. Rebuild the app.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"What does iOS push token and hwid look like?\"\n}\n[/block]\niOS device push tokens are strings with 64 hexadecimal symbols. Push token example:\n`03df25c845d460bcdad7802d2vf6fc1dfde97283bf75cc993eb6dca835ea2e2f`\nMake sure that iOS push tokens you use when targeting specific devices in your API requests are  in **lower case**.\n\nStarting with iOS 7 Pushwoosh SDK hwid is based on either IDFV or IDFA depending on the application settings (whether the app is using Ad Framework). **If you do not use the Advertisement Identifier in your application for advertising, do not link the AdSupport.framework**, and Pushwoosh will use IDFV instead of IDFA. HWID example:\n\n`CBAF8ED1-17FB-49A3-73BD-DC79B63AEF93`\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"HWID changes every time app opens when installed from TestFlight\"\n}\n[/block]\nThis is a design flaw in TestFlight, going back to 2014. It will only happen with TestFlight, not in production apps in the app store.\n\nIn this [talk transcript](http://asciiwwdc.com/2014/sessions/715), we read: \"Also this year, for TestFlight apps the advertising identifier will be different each time you call the API.\" \n\nMore information here: http://stackoverflow.com/questions/26648840/ios-testflight-beta-app-get-new-advertising-identifier-in-each-run\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"How do I switch banner on and off when my app is running?\"\n}\n[/block]\nBy default our latest iOS SDK displays the notification banner when the app is running in the foreground.\nYou can control this behavior by changing the following flags in the Info.plist:\n\nFlag `Pushwoosh_ALERT_TYPE` – string type, values are:\n  * `BANNER` – default value, displays banner in-app alert\n  * `ALERT` – alert notification\n  * `NONE` – do not show notifications when the app is in the foreground \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"How do I obtain my iOS device push token to use in Test Devices?\"\n}\n[/block]\nTo get your iOS device push token, \n\n  * open Xcode Devices;\n  * connect the test device to your computer;\n  * select your connected device in the list of devices on the left;\n  * click the up-triangle at the bottom left to view device console.\n\nLaunch the application for which you need the device push token, and locate your 64 hexadecimal characters device push token in the “Registered for push notifications” line:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/KVRTpQLoQ8iQbmZoKzsC_Devices.png\",\n        \"Devices.png\",\n        \"923\",\n        \"712\",\n        \"#9e462d\",\n        \"\"\n      ],\n      \"sizing\": \"smart\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"ios-faq","type":"basic","title":"iOS FAQ"}
* ["Your provisioning profile does not have APS entry" error](http://docs.pushwoosh.com/docs/ios-faq#your-provisioning-profile-does-not-have-aps-entry-) * [What does iOS push token and HWID look like?](http://docs.pushwoosh.com/docs/ios-faq#what-does-ios-push-token-and-hwid-look-like) * [HWID changes every time app is opened when installed from TestFlight](http://docs.pushwoosh.com/docs/ios-faq#hwid-is-changing-every-times-app-open-when-install) * [How do I switch banner on and off when my app is running?](http://docs.pushwoosh.com/docs/ios-faq#how-to-switch-banner-on-and-off-when-my-app-is-run) * [How do I obtain my iOS device push token to use in Test Devices?](http://docs.pushwoosh.com/docs/ios-faq#how-do-i-obtain-my-ios-device-push-token-to-use-in) [block:api-header] { "type": "basic", "title": "Troubleshooting" } [/block] [block:callout] { "type": "warning", "body": "For load balancing purposes we may need to change the API endpoints in your application. This happens automatically and is handled by our SDK. **Please make sure that nothing in your app is blocking access to any URL containing *.pushwoosh.com.**" } [/block] [block:callout] { "type": "info", "body": "If you are behind Firewall or your WiFi router acts as a Firewall\n\nIf your device is connected to the Internet via WiFi, and messages don’t get through to the device, please **make sure APNs ports are not blocked by your firewall.**\nPush providers, iOS devices, and Mac computers are often behind firewalls. To send notifications, you will need to allow inbound and outbound TCP packets over port 2195. Devices and computers connecting to push service over **Wi-Fi will need to allow inbound and outbound TCP packets over port 5223.**\nThe IP address range for the push service can change; providers are expected to connect by hostname rather than IP address. Push service uses a load balancing scheme that yields a different IP address for the same hostname. However, the entire 17.0.0.0/8 address block is assigned to Apple, so you can specify that range in your firewall rules.", "title": "If you are behind a Firewall or your WiFi router acts as a Firewall" } [/block] [block:api-header] { "type": "basic", "title": "\"Your provisioning profile does not have APS entry\" error" } [/block] If you see the "Your provisioning profile does not have APS entry." error message, make sure your provisioning profile is push compatible and has the `aps-environment` string in it with the `production` or `development` value. The easiest way to check is to open the mobile provisioning profile in any text editor and look for the `aps-environment` string. It should be there. If it is, and you keep receiving the error, it means that XCode still picks a "non push-compatible" profile. Please make sure you sign with the right one - sometimes if you have two profiles for the same App ID XCode messes things up and signs with the old one. The recommended steps are: 1. [Remove](http://stackoverflow.com/questions/18923095/delete-provisioning-profile-from-xcode-5) all XCode profiles; 2. Add the one and only new profile; 3. Rebuild the app. [block:api-header] { "type": "basic", "title": "What does iOS push token and hwid look like?" } [/block] iOS device push tokens are strings with 64 hexadecimal symbols. Push token example: `03df25c845d460bcdad7802d2vf6fc1dfde97283bf75cc993eb6dca835ea2e2f` Make sure that iOS push tokens you use when targeting specific devices in your API requests are in **lower case**. Starting with iOS 7 Pushwoosh SDK hwid is based on either IDFV or IDFA depending on the application settings (whether the app is using Ad Framework). **If you do not use the Advertisement Identifier in your application for advertising, do not link the AdSupport.framework**, and Pushwoosh will use IDFV instead of IDFA. HWID example: `CBAF8ED1-17FB-49A3-73BD-DC79B63AEF93` [block:api-header] { "type": "basic", "title": "HWID changes every time app opens when installed from TestFlight" } [/block] This is a design flaw in TestFlight, going back to 2014. It will only happen with TestFlight, not in production apps in the app store. In this [talk transcript](http://asciiwwdc.com/2014/sessions/715), we read: "Also this year, for TestFlight apps the advertising identifier will be different each time you call the API." More information here: http://stackoverflow.com/questions/26648840/ios-testflight-beta-app-get-new-advertising-identifier-in-each-run [block:api-header] { "type": "basic", "title": "How do I switch banner on and off when my app is running?" } [/block] By default our latest iOS SDK displays the notification banner when the app is running in the foreground. You can control this behavior by changing the following flags in the Info.plist: Flag `Pushwoosh_ALERT_TYPE` – string type, values are: * `BANNER` – default value, displays banner in-app alert * `ALERT` – alert notification * `NONE` – do not show notifications when the app is in the foreground [block:api-header] { "type": "basic", "title": "How do I obtain my iOS device push token to use in Test Devices?" } [/block] To get your iOS device push token, * open Xcode Devices; * connect the test device to your computer; * select your connected device in the list of devices on the left; * click the up-triangle at the bottom left to view device console. Launch the application for which you need the device push token, and locate your 64 hexadecimal characters device push token in the “Registered for push notifications” line: [block:image] { "images": [ { "image": [ "https://files.readme.io/KVRTpQLoQ8iQbmZoKzsC_Devices.png", "Devices.png", "923", "712", "#9e462d", "" ], "sizing": "smart" } ] } [/block]