I'm experimenting a bit with geofences on iOS (related thread) and have encountered something unexpected.
When starting the app, the OS asks me (something like):
"Do you want to allow this app to use positioning"
With these options for the user to select from:
However, as my app needs to react to the geofences while it is in the background, I need to pick the "allow always" option. That isn't available in the list above. To pick that option I need to manually go into the Settings app on the iPhone, find my app and in the Positioning settings there, I can find the "allow always" option.
So my question is, can I do something to make sure the "always allow" is in the initial list presented to the user?
If not, what strategies could I use? (I'm not very tempted to having to instruct the user to manually go into the settings etc - it's just bad user experience.)
I tried searching the forum about this but came up empty. I should also note that I do have a fully updated iPhone, and I do have this key in the code:
When starting the app, the OS asks me (something like):
"Do you want to allow this app to use positioning"
With these options for the user to select from:
- Don't allow
- Allow once
- Allow while app is in foreground
However, as my app needs to react to the geofences while it is in the background, I need to pick the "allow always" option. That isn't available in the list above. To pick that option I need to manually go into the Settings app on the iPhone, find my app and in the Positioning settings there, I can find the "allow always" option.
So my question is, can I do something to make sure the "always allow" is in the initial list presented to the user?
If not, what strategies could I use? (I'm not very tempted to having to instruct the user to manually go into the settings etc - it's just bad user experience.)
I tried searching the forum about this but came up empty. I should also note that I do have a fully updated iPhone, and I do have this key in the code:
B4X:
#PlistExtra:<key>NSLocationAlwaysAndWhenInUseUsageDescription</key><string>Monitor some region.</string>