I use the plugin cordova-plugin-geolocation. My only issue is that the message prompt to allow location looks like this:
/var/container/bundle/applica
The solution has changed for cordova-plugin-geolocation: "4.0.0". This is what you need to add in your config.xml:
config.xml
need location access to find things nearby
For more information: https://github.com/apache/cordova-plugin-geolocation