[TIMOB-17688] iOS8: Add ability to request Geo Location Permission
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-09-26T18:40:35.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.4.0, Release 3.5.0 |
Components | iOS |
Labels | IOS8, ios |
Reporter | Ben Bahrenburg |
Assignee | Pedro Enrique |
Created | 2014-09-14T01:24:07.000+0000 |
Updated | 2014-11-21T20:25:24.000+0000 |
Description
With iOS8 now there is the need to request specific geo location permissions.
The PR for this method is here https://github.com/appcelerator/titanium_mobile/pull/6073
How to test this can be found here https://gist.github.com/benbahrenburg/4bcda636397cb095025f
The API for this is pretty simple
Ti.Geolocation.requestAuthorization(Ti.Geolocation.AUTHORIZATION_ALWAYS);
or
Ti.Geolocation.requestAuthorization(Ti.Geolocation.AUTHORIZATION_WHEN_IN_USE);
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2014-09-18 at 11.15.37 AM.png | 2014-09-18T18:21:55.000+0000 | 58892 |
[~penrique] FYI
New PR, contains Ben's work plus some minor indentation fixes: https://github.com/appcelerator/titanium_mobile/pull/6082/
Backport to 3.4.x https://github.com/appcelerator/titanium_mobile/pull/6086
FR pass, both PRs merged
[~cng] Make sure to remove the merge-3.4.0 label and add the "Release 3.4.0" fix version (in the future).
Seeing a problem with this when the app is backgrounded: 1. App starts, dialog pops up asking "Allow myapp to access your location while you use the app?" (Don't Allow/Allow) 2. Click screen lock or wait until it locks 3. Unlock the screen 4. The geolocation authorization dialog is gone, geolocation events don't fire Any ideas how to deal with this? Thanks
The above comment applies to iOS 8 simulator and device. iOS 7 simulator works fine - the dialog is there after screen unlock.
Update: this appears to be horrendous new behavior under iOS 8...... The Google Maps app also doesn't show the permission dialog after a screen lock.