Google Maps in an iOS App

Hello all,

I’ve been playing a bit with meteor and I have no problems with Google Maps on the desktop. I used the code from this repo https://github.com/meteor/mobile-packages/tree/master/examples/solomo

But when i run the commands
meteor add-platform ios
meteor run ios

The Google Maps doesn’t work on the phone, everything I get is a white screen. I’ve been searching around and I’ve found another example, but it doesn’t work either: https://github.com/dburles/meteor-google-maps-demo

Does any of you know how to insert Google Maps inside a meteor iOS App? I don’t even know where to start looking for the problem…

Thanks!

You need to use App.accessRule() and whitelist the google maps domain I presume.

1 Like

Thanks MazDev!

I didn’t know about the App.accessRule(), I’ve found this github issue https://github.com/dburles/meteor-google-maps/issues/27

I’m gonna try :slight_smile:

It works now!

I had to add

App.accessRule('https://*.googleapis.com/*');
App.accessRule('https://*.google.com/*');
App.accessRule('https://*.gstatic.com/*');

in the mobile-config.js file under the parent directory.

1 Like

Hi, I have had maps working on Cordova on Meteor 1.3 (latest version) and iOS 10 (and previous versions) for a while.

I just upgraded to Meteor 1.4.1.1 and I am getting a black screen on Cordova (works fine in browser on mobile) … Any ideas pls?