-1

This is not fully functional app but its demo/prototype.

Demo is kind of famous places near by you and some photos around. For demo purpose, we have choose NewYork as city.

I want to simulate user's device location to New york (blue circle) instead of actual location.

How can i change user's current location forcefully ? (Any API for this in CLLocationManager? )

harshit2811
  • 827
  • 1
  • 7
  • 21

3 Answers3

2

Run the app in the iOS Simulator, and under the debug menu, select Location. You can either input a custom location with a latitude and longitude, or select one of the given ones to simulate a location for your app.

Sudeep
  • 796
  • 6
  • 16
  • Thanks Sudeep but it is for how to achieve in device. – harshit2811 Apr 24 '15 at 14:29
  • This approach works for both the simulator and also for a device when you are debugging directly on the phone. My cautionary tale: sometimes the simulated location sticks on the phone. I needed to reset Network Settings to undo this once. – Dan Loughney Apr 24 '15 at 18:18
1

Run your app on simulator and see my screenshot to give custom location

I have given new york's exact lat and long value you can use it...

vijeesh
  • 1,317
  • 1
  • 17
  • 32
0

you need to edit the scheme that you are running. Click on your project name next to the "stop" button and go to "Edit Scheme." Under the Options tab click the "Allow Location Simulation" checkbox and then pick NYC, Ny from the dropdown.

You can also add your own locations in GPX file format...enjoy

RJDubz
  • 165
  • 1
  • 7