{"_id":"59e70b9fe027ae002e7d2f2a","category":{"_id":"59e70b9ee027ae002e7d2ed4","version":"59e70b9ee027ae002e7d2ed2","project":"5496d393f52a630b00519cdd","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-01T11:28:38.565Z","from_sync":false,"order":1,"slug":"getting-started-ios","title":"iOS Reference"},"project":"5496d393f52a630b00519cdd","user":"5496d353f52a630b00519cdc","parentDoc":null,"version":{"_id":"59e70b9ee027ae002e7d2ed2","project":"5496d393f52a630b00519cdd","__v":2,"createdAt":"2017-10-18T08:06:54.462Z","releaseDate":"2017-10-18T08:06:54.462Z","categories":["59e70b9ee027ae002e7d2ed3","59e70b9ee027ae002e7d2ed4","59e70b9ee027ae002e7d2ed5","59e70b9ee027ae002e7d2ed6","59e70b9ee027ae002e7d2ed7","59e70b9ee027ae002e7d2ed8","59e70b9ee027ae002e7d2ed9","59e70b9ee027ae002e7d2eda","59e70b9ee027ae002e7d2edb","59e70b9ee027ae002e7d2edc","59e70b9ee027ae002e7d2edd","59e70b9ee027ae002e7d2ede","59e70b9ee027ae002e7d2edf","5b8661ccdd19310003a3fa0b"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"2.0.10","version":"2.0.10"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-08-08T13:38:36.597Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"In order to support iOS 11 latest location-tracking changes, please make sure you have done the following:\n[block:api-header]\n{\n  \"title\": \"1. Add plist attributes\"\n}\n[/block]\nAs of iOS 11, in order to get the \"Always\" location permission, the user must be presented with the \"When-in-use\" permission as well. **Therefore, in order to support iOS 11 \"always\" location tracking, you *must* include all of the following plist attributes:**\n  * **“NSLocationAlwaysUsageDescription”**\n  * **“NSLocationAlwaysAndWhenInUseUsageDescription ”**\n  * **“NSLocationWhenInUseUsageDescription”**\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/2549429-permissions.png\",\n        \"permissions.png\",\n        1535,\n        737,\n        \"#dedddc\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"2. Handle the \\\"when-in-use\\\" Permission Alert\"\n}\n[/block]\nSince the user must be presented with both \"When-in-use\" and \"Always\" permission-options, the default Placer-Activate behavior for new users is presenting the \"When-in-use\" alert, followed by the \"Always\" one.\n**If you wish to disable Placer's permission alerts logic and create your own request experience, activate Placer with the [andDisableLocationPermissionAlerts Method](doc:customization#activating-the-sdk-without-permissions-alerts ).**\n\nPlacer's default behavior flow:\n\n**First Alert View (\"When-in-use\")** \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9d5d870-Simulator_Screen_Shot_-_iPhone_7_Plus_-_2017-08-09_at_17.42.08.png\",\n        \"Simulator Screen Shot - iPhone 7 Plus - 2017-08-09 at 17.42.08.png\",\n        1242,\n        2208,\n        \"#838383\"\n      ]\n    }\n  ]\n}\n[/block]\n**Second Alert View (\"Always\")** \nNote - this alert is presented only if the user clicked \"allow\" in the When-in-use alert view.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/e0119dd-Simulator_Screen_Shot_-_iPhone_7_Plus_-_2017-08-09_at_17.51.39.png\",\n        \"Simulator Screen Shot - iPhone 7 Plus - 2017-08-09 at 17.51.39.png\",\n        1242,\n        2208,\n        \"#838383\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"3. Consider removing the \\\"UIBackgroundModes > Location Updates\\\"\"\n}\n[/block]\nIn several iOS 11 beta versions, apps that requested for \"background mode - location updates\" generated a \"blue status bar\" when the app is in the background, however, as of the latest release, this is no longer the case. Nevertheless, if you don't require this flag, to avoid related issues in the future, consider disabling it (and not to include it in the plist file). \n\nRest assured that the Placer SDK does **not** require this mode in order to generate an accurate User Timeline in the background.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/105febe-Untitled-1.png\",\n        \"Untitled-1.png\",\n        1654,\n        640,\n        \"#edeeee\"\n      ]\n    }\n  ]\n}\n[/block]\n##That's it!","excerpt":"","slug":"ios-11-migration-changes","type":"basic","title":"iOS 11 - Migration Changes"}

iOS 11 - Migration Changes


In order to support iOS 11 latest location-tracking changes, please make sure you have done the following: [block:api-header] { "title": "1. Add plist attributes" } [/block] As of iOS 11, in order to get the "Always" location permission, the user must be presented with the "When-in-use" permission as well. **Therefore, in order to support iOS 11 "always" location tracking, you *must* include all of the following plist attributes:** * **“NSLocationAlwaysUsageDescription”** * **“NSLocationAlwaysAndWhenInUseUsageDescription ”** * **“NSLocationWhenInUseUsageDescription”** [block:image] { "images": [ { "image": [ "https://files.readme.io/2549429-permissions.png", "permissions.png", 1535, 737, "#dedddc" ] } ] } [/block] [block:api-header] { "title": "2. Handle the \"when-in-use\" Permission Alert" } [/block] Since the user must be presented with both "When-in-use" and "Always" permission-options, the default Placer-Activate behavior for new users is presenting the "When-in-use" alert, followed by the "Always" one. **If you wish to disable Placer's permission alerts logic and create your own request experience, activate Placer with the [andDisableLocationPermissionAlerts Method](doc:customization#activating-the-sdk-without-permissions-alerts ).** Placer's default behavior flow: **First Alert View ("When-in-use")** [block:image] { "images": [ { "image": [ "https://files.readme.io/9d5d870-Simulator_Screen_Shot_-_iPhone_7_Plus_-_2017-08-09_at_17.42.08.png", "Simulator Screen Shot - iPhone 7 Plus - 2017-08-09 at 17.42.08.png", 1242, 2208, "#838383" ] } ] } [/block] **Second Alert View ("Always")** Note - this alert is presented only if the user clicked "allow" in the When-in-use alert view. [block:image] { "images": [ { "image": [ "https://files.readme.io/e0119dd-Simulator_Screen_Shot_-_iPhone_7_Plus_-_2017-08-09_at_17.51.39.png", "Simulator Screen Shot - iPhone 7 Plus - 2017-08-09 at 17.51.39.png", 1242, 2208, "#838383" ] } ] } [/block] [block:api-header] { "title": "3. Consider removing the \"UIBackgroundModes > Location Updates\"" } [/block] In several iOS 11 beta versions, apps that requested for "background mode - location updates" generated a "blue status bar" when the app is in the background, however, as of the latest release, this is no longer the case. Nevertheless, if you don't require this flag, to avoid related issues in the future, consider disabling it (and not to include it in the plist file). Rest assured that the Placer SDK does **not** require this mode in order to generate an accurate User Timeline in the background. [block:image] { "images": [ { "image": [ "https://files.readme.io/105febe-Untitled-1.png", "Untitled-1.png", 1654, 640, "#edeeee" ] } ] } [/block] ##That's it!