Failing to get the cordova-plugin-geolocation 4.0.1 to work in an iOS app, despite following all instructions. When the app asks for location permission, the geolocation message displays the path of the webview:
/Users/.../Library/Developer/CoreSimulator/Devices/.../www/index.html
rather than the name of the app and the message in the NSLocationWhenInUseUsageDescription
string.
I have tried solutions in other answers (1, 2, 3):
The location is not requested until well after the device is ready --- this happens only when the user goes to a particular page in the app.
I have removed and added the plugin many times. All plugin files seem to be where they should be.
The
NSLocationWhenInUseUsageDescription
is properly set inconfig.xml
andinfo.plist
. And just to be safe, the variableGEOLOCATION_USAGE_DESCRIPTION
is also set inconfig.xml
.
Please help!