Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps on iOS Simulator?

I'm building an iOS app that I want to interact with the Native maps application that comes on iPhone & iPad. No maps application seems to be installed on either of the simulators.

How can I test this functionality on the iOS simulator?


When I let Google Maps website take over with the following url

http://maps.google.com/maps?ll=37.785834,-122.406417

This happens

enter image description here

like image 345
Philip Kirkbride Avatar asked Jul 26 '12 18:07

Philip Kirkbride


People also ask

Does Location work on iOS simulator?

in iOS Simulator menu, go to Features -> Location -> Custom Location. There you can set the latitude and longitude and test the app accordingly. This works with mapkit and also with CLLocationManager.

Can you install apps on iOS simulator?

Install Apps on SimulatorsTo install an app on a connected simulator, follow these steps. Go to Apps > Install Application. Find and open the app you want to install from your Mac. The app appears in the list of installed apps on the right side of the iOS Gateway window.

Is there a Google My Maps app for iOS?

My Maps isn't available for iPhone or iPad, but you can view your My Maps using Google Maps on your computer.


2 Answers

Use this documentation from Apple: http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html

As it says there:

If the Maps application is not installed on the device, opening a map URL forwards the request to the Google Maps website.

So you can test this in the simulator, but it will open in Safari instead.

like image 134
woz Avatar answered Sep 20 '22 13:09

woz


[someUIApplication openURL:[NSURL URLWithString:@"http://maps.google.com/maps?q=London"]]

This will open the maps app from apple.

NOTE: THIS ONLY WORKS ON THE DEVICE ITSELF. NOT IN THE SIMULATOR.

It's one of the "missing" features of the simulator.

Like Woz said, it will open on safari, not in the native app.

like image 42
NSPunk Avatar answered Sep 19 '22 13:09

NSPunk