{"action":"created","issue":{"url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/206","repository_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon","labels_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/206/labels{/name}","comments_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/206/comments","events_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/206/events","html_url":"https://github.com/petermetz/cordova-plugin-ibeacon/issues/206","id":137865610,"node_id":"MDU6SXNzdWUxMzc4NjU2MTA=","number":206,"title":"didEnterRegion and didExitRegion don't work on iOS","user":{"login":"Ber4B","id":13572997,"node_id":"MDQ6VXNlcjEzNTcyOTk3","avatar_url":"https://avatars1.githubusercontent.com/u/13572997?v=4","gravatar_id":"","url":"https://api.github.com/users/Ber4B","html_url":"https://github.com/Ber4B","followers_url":"https://api.github.com/users/Ber4B/followers","following_url":"https://api.github.com/users/Ber4B/following{/other_user}","gists_url":"https://api.github.com/users/Ber4B/gists{/gist_id}","starred_url":"https://api.github.com/users/Ber4B/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ber4B/subscriptions","organizations_url":"https://api.github.com/users/Ber4B/orgs","repos_url":"https://api.github.com/users/Ber4B/repos","events_url":"https://api.github.com/users/Ber4B/events{/privacy}","received_events_url":"https://api.github.com/users/Ber4B/received_events","type":"User","site_admin":false},"labels":[{"id":86387072,"node_id":"MDU6TGFiZWw4NjM4NzA3Mg==","url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-03-02T12:46:58Z","updated_at":"2018-07-01T18:13:48Z","closed_at":"2016-03-27T10:17:33Z","author_association":"NONE","body":"It seems that the didEnterRegion and didExitRegion don't fire on iOS (they do work on Android). Is this a know issue, or am I just doing it wrong? \n\nThe code:\n\n```\nvar delegate = new cordova.plugins.locationManager.Delegate();\n\ndelegate.didDetermineStateForRegion = function (result) {\n    if(result){\n        console.log('[DOM] didDetermineStateForRegion: ' + JSON.stringify(result));\n    } else {\n        console.log(\"didDetermineStateForRegion did not return data\");\n    }\n};\n\ndelegate.didStartMonitoringForRegion = function (result) {\n    if(result){\n        console.log('didStartMonitoringForRegion:' + JSON.stringify(result));\n    } else {\n        console.log(\"didStartMonitoringForRegion is empty\");\n    }\n};\n\ndelegate.didEnterRegion = function(result){\n    if(result){\n        console.log(\"ENTERED REGION: \" + JSON.stringify(result));\n    } else {\n        console.log(\"didEnterRegion has no data.\");\n    }\n};\n\ndelegate.didExitRegion = function(result){\n    if(result){\n        console.log(\"EXITED REGION: \" + JSON.stringify(result));\n    } else {\n        console.log(\"didExitRegion has no data.\");\n    }\n};\n\ndelegate.didRangeBeaconsInRegion = function (result) {\n    //I have a function for ranging here\n};\n\nvar uuid = 'MY UUID IS HERE';\nvar identifier = 'Name of the beacons';\nvar beaconRegion = new cordova.plugins.locationManager.BeaconRegion(identifier, uuid);\n\ncordova.plugins.locationManager.setDelegate(delegate);\ncordova.plugins.locationManager.requestAlwaysAuthorization();\n\ncordova.plugins.locationManager.startMonitoringForRegion(beaconRegion)\n    .fail(console.error)\n    .done();\ncordova.plugins.locationManager.startRangingBeaconsInRegion(beaconRegion)\n    .fail(console.error)\n    .done();\n```\n"},"comment":{"url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/comments/401623322","html_url":"https://github.com/petermetz/cordova-plugin-ibeacon/issues/206#issuecomment-401623322","issue_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/206","id":401623322,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTYyMzMyMg==","user":{"login":"Ritzlgrmft","id":2368119,"node_id":"MDQ6VXNlcjIzNjgxMTk=","avatar_url":"https://avatars2.githubusercontent.com/u/2368119?v=4","gravatar_id":"","url":"https://api.github.com/users/Ritzlgrmft","html_url":"https://github.com/Ritzlgrmft","followers_url":"https://api.github.com/users/Ritzlgrmft/followers","following_url":"https://api.github.com/users/Ritzlgrmft/following{/other_user}","gists_url":"https://api.github.com/users/Ritzlgrmft/gists{/gist_id}","starred_url":"https://api.github.com/users/Ritzlgrmft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ritzlgrmft/subscriptions","organizations_url":"https://api.github.com/users/Ritzlgrmft/orgs","repos_url":"https://api.github.com/users/Ritzlgrmft/repos","events_url":"https://api.github.com/users/Ritzlgrmft/events{/privacy}","received_events_url":"https://api.github.com/users/Ritzlgrmft/received_events","type":"User","site_admin":false},"created_at":"2018-07-01T18:13:48Z","updated_at":"2018-07-01T18:13:48Z","author_association":"CONTRIBUTOR","body":"I do a lot of other checks before calling requestStateForRegion:\r\n- `isRangingAvailable()`\r\n- `isMonitoringAvailableForClass()`\r\n- `getAuthorizationStatus()`  \r\n  result must be `AuthorizationStatus.Always` on iOS\r\n\r\nMaybe one of these calls fails?\r\n\r\nAdditionally you could try your luck with `startRangingBeaconsInRegion()`. Normally you should call it only when you are in a region, but you can try is also without, just to check, if it works in general."}}
{"actor":{"display_login":"Ritzlgrmft"}}