Has anyone faced Geolocation permission alert for iOS showing twice issue along with bundle location?

1.8k views Asked by At

Geolocation permission alert for iOS showing twice along with bundle location .

  • I have tried by installing latest plugin and other similar answers provided for this

  • Even used below key in info.plist

    "NSLocationAlwaysUsageDescription"

  • But still I m getting below error:

    "private/var/mobile/Containers/Bundle/Application/0846B1D6-02AB-4846-ACD2-F722214B9015/myapp.app/www/index.html" in iOS phone gap project.

Can any one suggest me if any other ways to solve this

1

There are 1 answers

2
soumya On BEST ANSWER

I finally solved this with on device ready function loading to body tag

 function onDeviceReady(){
     return navigator.geolocation.getCurrentPosition(initialize);
      document.addEventListener("backbutton", onBackKeyDown, false);

   }


 function onLoad()
{
     if (typeof navigator.device == "undefined"){
        document.addEventListener("deviceready", onDeviceReady, false);
    } else {
        onDeviceReady();
    }
 }


 <body onload="onLoad();">