Im testing our PG app for the coming iOS 8 release and I can't get the geolocation plugin to get my position. Everything works fine under iOS 7. Im currently using iOS 8 Beta 5 and the latest cordova and geolocation plugin builds.
- 1 Post
- 0 Reply Likes
Posted 6 years ago
ryan, Developer
- 1538 Posts
- 132 Reply Likes
Official Response
OK, I just tested things out using PhoneGap 3.6.3 and Geolocation 0.3.10 on iOS 8.
If you add the Geolocation plugin (but no
The result of which is that on a geolocation call, the user is prompted with
If in addition to the plugin you add the following to your config.xml:
you will find the following in your compiled app's Info.plist:
and the result will be that on a geolocation call, the user is prompted with
After clicking allow in both scenarios, geolocation calls were successful. If you are unable to get any of this working, please post your App ID and I will try to have a look.
For references sake, here is the default Plist settings created by adding the plugin:
https://github.com/apache/cordova-plu...
And here is the code which determines whether to
https://github.com/apache/cordova-plu...
If you add the Geolocation plugin (but no
<config-file> changes) to your config.xml, you will find the following in your compiled app's Info.plist:
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
The result of which is that on a geolocation call, the user is prompted with
Allow "App Name" to access your location while you use the app?
If in addition to the plugin you add the following to your config.xml:
<gap:config-file platform="ios" parent="NSLocationAlwaysUsageDescription" overwrite="true">
<string>WE RE LIKE TOTALLY TRACKING YOU OMG</string>
</gap:config-file>
you will find the following in your compiled app's Info.plist:
<key>NSLocationAlwaysUsageDescription</key>
<string>WE RE LIKE TOTALLY TRACKING YOU OMG</string>
and the result will be that on a geolocation call, the user is prompted with
Allow "App Name" to access your location even when you are not using the app? WE RE LIKE TOTALLY TRACKING YOU OMG
After clicking allow in both scenarios, geolocation calls were successful. If you are unable to get any of this working, please post your App ID and I will try to have a look.
For references sake, here is the default Plist settings created by adding the plugin:
https://github.com/apache/cordova-plu...
And here is the code which determines whether to
requestAlwaysAuthorization or requestWhenInUseAuthorization:
https://github.com/apache/cordova-plu...
Related Categories
-
PhoneGap Framework
- 2926 Conversations
- 61 Followers
-
PhoneGap Build
- 15111 Conversations
- 275 Followers




