{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4259","repository_url":"https://api.github.com/repos/mapbox/mapbox-gl-native","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4259/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4259/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4259/events","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/4259","id":139725400,"number":4259,"title":"iOS SDK starts location services on launch - need a way to delay/defer it","user":{"login":"cowgp","id":401458,"avatar_url":"https://avatars.githubusercontent.com/u/401458?v=3","gravatar_id":"","url":"https://api.github.com/users/cowgp","html_url":"https://github.com/cowgp","followers_url":"https://api.github.com/users/cowgp/followers","following_url":"https://api.github.com/users/cowgp/following{/other_user}","gists_url":"https://api.github.com/users/cowgp/gists{/gist_id}","starred_url":"https://api.github.com/users/cowgp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowgp/subscriptions","organizations_url":"https://api.github.com/users/cowgp/orgs","repos_url":"https://api.github.com/users/cowgp/repos","events_url":"https://api.github.com/users/cowgp/events{/privacy}","received_events_url":"https://api.github.com/users/cowgp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/iOS","name":"iOS","color":"207de5"},{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/telemetry","name":"telemetry","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-09T22:47:47Z","updated_at":"2016-04-04T15:38:42Z","closed_at":null,"body":"A recent update to the iOS SDK added this line:\r\nhttps://github.com/mapbox/mapbox-gl-native/blob/master/platform/ios/src/MGLMapboxEvents.m#L287\r\n\r\nThe the init of MGLMapboxEvents calls\r\n     \r\n     _paused = YES;\r\n      [self resumeMetricsCollection];\r\n\r\nbut this actually makes it pass through and trigger the newly added line 287 linked above and actually initialize and start tracking user location during applicationDidFinishLaunching\r\n\r\nThis would be fine if my app was like the demo and I wanted the first thing you see to be a map, but map features are just one aspect of my app, I'd like to thus be in control and not start tracking a user till they have actually opened a view with a map on it."},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/comments/205355328","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/4259#issuecomment-205355328","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4259","id":205355328,"user":{"login":"boundsj","id":63186,"avatar_url":"https://avatars.githubusercontent.com/u/63186?v=3","gravatar_id":"","url":"https://api.github.com/users/boundsj","html_url":"https://github.com/boundsj","followers_url":"https://api.github.com/users/boundsj/followers","following_url":"https://api.github.com/users/boundsj/following{/other_user}","gists_url":"https://api.github.com/users/boundsj/gists{/gist_id}","starred_url":"https://api.github.com/users/boundsj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boundsj/subscriptions","organizations_url":"https://api.github.com/users/boundsj/orgs","repos_url":"https://api.github.com/users/boundsj/repos","events_url":"https://api.github.com/users/boundsj/events{/privacy}","received_events_url":"https://api.github.com/users/boundsj/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T15:38:42Z","updated_at":"2016-04-04T15:38:42Z","body":"> @postmechanical  Setting the access token should not immediately attempt to enable location permissions because the telemetry managing class needs to init.\r\n\r\nThe location permissions prompt that a user sees will only be triggered by the Mapbox SDK when the map view's `showsUserLocation` is sent YES. Setting the access token does not trigger any location services prompts and Telemetry itself will [never ask for location permission](https://github.com/mapbox/mapbox-gl-native/blob/5eda74a514964d1cac684483bafa08d458175f9a/platform/ios/src/MGLLocationManager.m#L64-L65)"}}