0

I am using iOS 6 with XCode 4.5.

Trying to create Map based application. In that I have placed Mapview in the XIB and mapped with IBOutlet with the corresponding view controller.

I dont have device now, so i am tesing in iOS 6 simulator. The current location is shown as Netherlands, which is irrelevant.

Tried to solve by:

  1. Editing the schema, by checking and unchecking the option Allow Location Simulation.
  2. iOS Simulator Menu -> Debug -> Location -> Changed from none to Apple and other.
  3. I have set Show User Location enabled in the Attribute inspector.
  4. Also I have given mapView.showsUserLocation = YES.

None of the above helped.

Could you please help me in solving this problem.

Thanks,

Easwaramoorthy Kanagaraj
  • 3,925
  • 8
  • 36
  • 62

1 Answers1

2

The Simulator is Not having any GPS so it can't show the correct Location. You will find some Predefined Locations by Selecting the Location in your Console.

enter image description here

enter image description here

You can get a Nice Project from here for testing Current Location in simulator.

FTLocationSimulator allows simulating Core Location in the iPhone simulator on the desktop. It sends fake Core Location updates taken from a KML file that describes a predefined route.

Besides the simulated Core Location updates, it also updates the blue userLocation view on MapKit views. The sample project shows how to integrate FTLocationSimulator into an existing app, in this case Apple's "Breadcrumb" sample application.

Source : Testing CoreLocation on iPhone Simulator

Community
  • 1
  • 1
Siba Prasad Hota
  • 4,779
  • 1
  • 20
  • 40