[MAYBE RESOLVED] "/private/var/mobile/Containers/Bundle/Application/" Would Like To Use Your Current Location

I know it’s a bit old discussion, but I think I just found a simple solution for this issue. It may help other developers who are stuck in this error.
After a few hours of workarounds based on the stack overflow answers, finally realised that the geolocation plugin was missing in platforms/ios/[my project name]/Plugins folder even though it was added via cordova plugin add command. So I tried removing the plugin and adding it again. It worked !! And the plugin appeared under Plugins folder in platforms/ios. Then I took a build and this ugly popup is not appearing after the first popup with the string that we give in plist

<key> NSLocationWhenInUseUsageDescription </key>
<string> App Using Location </string>.

Didn’t change a single line of code for resolving this issue.

My code in controller looks like this and is written ionic.Platform.ready(function() {…} $cordovaGeolocation.getCurrentPosition(posOptions).then(function(position) {
$scope.location.latitude = position.coords.latitude;
$scope.location.longitude = position.coords.longitude;

1 Like

Removing and reinstalling the plugin worked for me, thanks @melwinVincent.

thanks man, for your solution.