Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In the simulator, the user's current location is always in Cupertino, California.</p> <p>If you're using Interface Builder to add your map view, simply check the "Shows User Location" check box in the Attributes Inspector for the map view. (Select the map view and type <code>command-1</code> to display the attributes inspector.)</p> <p>If you're adding or manipulating the map view programmatically, set the <a href="http://developer.apple.com/library/ios/documentation/MapKit/Reference/MKMapView_Class/MKMapView/MKMapView.html#//apple_ref/doc/uid/TP40008205-CH3-SW15" rel="noreferrer"><code>showsUserLocation</code></a> property of the map view to <code>YES</code>.</p> <hr> <p><strong>Update</strong>: It turns out that this is possible, just not using the built in map view functionality, and it doesn't always work. </p> <p>Recent versions of the SDK (which have to run on Snow Leopard) can get the location of the machine the simulator is running on using CLLocationManager. You can then use this location to create an annotation to display on the map view. It won't behave like the built in "user's location indicator" (at least not without some work), but it will show the user's current location.</p> <p>See <a href="https://devforums.apple.com/message/169231#169231" rel="noreferrer">this post</a> for details of when this technique won't work.</p> <p>See the "Related sample code" section of the <a href="http://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html" rel="noreferrer">CLLocationManager documentation</a> for sample code that uses CLLocationManager and CLLocationManagerDelegate and then displays the user's location on a map view.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload