Issue getting Geolocation in iOS


I am using Meteor on macOS and using Xcode 8.

After much effort to get my mobile app working in iOS 10 I am stumped on getting the geolocation working. The error I am getting is;

[blocked] Access to geolocation was blocked over insecure connection to http://localhost:12384.

I did build my mobile app using a secure connection using

meteor run ios-device --production --mobile-server 

Is Cordova/Meteor running its own web-server on the device and trying to access Safari geolocation API over an in-secured connection?

Any help is appreciated. Thank you.

For iOS 10 you need to have this key in your Info.plist:

My project already had that, so if yours doesn’t, maybe you have an old version of Cordova. Also make sure that you have the following in your mobile-config.js file:


Thanks for the reply. I just checked my Info.plist and I have all those strings however still getting the issue. I also added the accessRule with no luck :frowning:

I also had to add a port 443 and an equals sign before mine worked, but I think turning round three times and throwing salt over my shoulder also helped!


Ok, so I fixed this issue after a few hours of effort.

I had to wrap my code to check if it was a Cordova app where before I didn’t. No idea why this was causing the issue but it fixed the issue.

    Meteor.startup(function () {

      Location.startWatching(function(pos) {
          if (gpsLogging) console.log("Got a position!", pos);
        //  Location.enableAccuracyFilter(12);

          latLng = Location.getReactivePosition();

          Tracker.autorun(function() {



      }, function(err) {
          if (gpsLogging) console.log("Oops! There was an error", err);


I had the same issues and tried the above solution and it worked. Just for the record, I had this working before without a Meteor.startup(function () … but now that was necessary…

Anyway. Thanks for the help!