cowbell / cordova-plugin-geofence

Geofencing plugin for cordova
Apache License 2.0
265 stars 317 forks source link

iOS - initialization error callback is called before user takes action on location auth request #227

Open rastafan opened 7 years ago

rastafan commented 7 years ago

Hi,

we have a problem on iOS. Whenever we launch the initialization method, the app asks the user for localization permissions, but it fires the error callback BEFORE the user takes any action. In the error callback we have the message "Warning: Location always permissions not granted". If the user says "yes" to the authorization dialog, the next time the initialization is launched normally enters the success callback, as it should. Android works fine.

It is worth saying that, in order to be able to add the plugin to the iOS project, we followed what is said in https://github.com/cowbell/cordova-plugin-geofence/issues/215 issue, manually adding the three files from [https://github.com/ypelud/cordova-plugin-geofence/tree/d2e1f22340ac2cd07559598fd290df462e75055d/src/ios] this repository, because we were not able to build it with 8.3. We don't know if this could be the problem.

Plugin version is 0.7.0

What could be breaking the correct behaviour?

Thanks.

stellmaurer commented 7 years ago

I'm having this same issue after following those steps.