{"action":"created","issue":{"url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/172","labels_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/172/comments","events_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/172/events","html_url":"https://github.com/petermetz/cordova-plugin-ibeacon/issues/172","id":100544588,"number":172,"title":"requestWhenInUseAuthorization how do i capture a user pressing \"don't allow\"","user":{"login":"RShergold","id":3669281,"avatar_url":"https://avatars.githubusercontent.com/u/3669281?v=3","gravatar_id":"","url":"https://api.github.com/users/RShergold","html_url":"https://github.com/RShergold","followers_url":"https://api.github.com/users/RShergold/followers","following_url":"https://api.github.com/users/RShergold/following{/other_user}","gists_url":"https://api.github.com/users/RShergold/gists{/gist_id}","starred_url":"https://api.github.com/users/RShergold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RShergold/subscriptions","organizations_url":"https://api.github.com/users/RShergold/orgs","repos_url":"https://api.github.com/users/RShergold/repos","events_url":"https://api.github.com/users/RShergold/events{/privacy}","received_events_url":"https://api.github.com/users/RShergold/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-12T13:34:47Z","updated_at":"2015-08-12T14:44:09Z","closed_at":null,"body":"Hey guys, loving the plugin!\r\n\r\nI seem to have an issue where running cordova.plugins.locationManager.requestWhenInUseAuthorization() returns a promise but .then() runs instantly without any parameters and clicking \"don't allow\" doesn't produce an error.\r\n\r\nThis is pretty serious as Apple generally want you to respond appropriately to every user interaction.\r\n\r\nIdeally i'd like to be called when the user presses either button.\r\nI'd like to be able to detect the current permissions state. This way I can check when the app first opens if I have permission and if i need to show a warning to the user."},"comment":{"url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/comments/130326686","html_url":"https://github.com/petermetz/cordova-plugin-ibeacon/issues/172#issuecomment-130326686","issue_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/172","id":130326686,"user":{"login":"RShergold","id":3669281,"avatar_url":"https://avatars.githubusercontent.com/u/3669281?v=3","gravatar_id":"","url":"https://api.github.com/users/RShergold","html_url":"https://github.com/RShergold","followers_url":"https://api.github.com/users/RShergold/followers","following_url":"https://api.github.com/users/RShergold/following{/other_user}","gists_url":"https://api.github.com/users/RShergold/gists{/gist_id}","starred_url":"https://api.github.com/users/RShergold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RShergold/subscriptions","organizations_url":"https://api.github.com/users/RShergold/orgs","repos_url":"https://api.github.com/users/RShergold/repos","events_url":"https://api.github.com/users/RShergold/events{/privacy}","received_events_url":"https://api.github.com/users/RShergold/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T14:44:08Z","updated_at":"2015-08-12T14:44:08Z","body":"apologies. I found [LocationManager.getAuthorizationStatus()](https://github.com/petermetz/cordova-plugin-ibeacon/blob/50315dbc30698686f39f10d42501335d1a5d1674/www/LocationManager.js#L365 )\r\n\r\nand when a user clicks \"don't allow\" [Delegate.didChangeAuthorizationStatus()](https://github.com/petermetz/cordova-plugin-ibeacon/blob/50315dbc30698686f39f10d42501335d1a5d1674/www/Delegate.js#L124) is fired "}}