You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is quite desirable to be able to have control on when to request this permission from the user, rather than showing it as soon as the app launched for the first time.
The text was updated successfully, but these errors were encountered:
@garrettlangley
I do not know Swift lang, BUT! I managed to improvise a work around that postpones the permission dialog up until you add a region to monitor for the first time (using window.geofence.addOrUpdate()), if that helps you :)
What I did is edit the GeofencePlugin.swift file inside the plugin as follows:
Find class "GeoNotificationManager".
In it's "init" method you'll find the line:
if iOS8 {
locationManager.requestAlwaysAuthorization()
}
Move it into the start of the method "addOrUpdateGeoNotification", which is just the next method on this class.
Make this change to be picked up by your next builds:
Either perform the edit also in the internal copy of the GeofencePlugin.swift file in your Cordova project -> platforms -> ios -> project name -> plugins,
or else, if possible,
after editing the one in the standard Cordova project's "plugins" folder, do:
"cordova platform rm ios",
then:
"cordova platform add ios",
and it should be ready.
Hope my instructions are good for you :)
good luck.
thanks @shtaif i actually did something similar wherein i commented out the request for permissions from this plugin, and am getting the permissions from window.navigator.geolocation.getCurrentPosition(watchSuccess, watchError);
It is quite desirable to be able to have control on when to request this permission from the user, rather than showing it as soon as the app launched for the first time.
The text was updated successfully, but these errors were encountered: