简体   繁体   中英

How to simulate significant Location update in iphone simulator

是否有任何方法可以检查模拟器中的重大位置变化,而不是检查GPS更新

You can do it by using the simulator's 'Free Drive' option.

Once you have your code setup for monitoring significant location updates, do the following:

  1. Select your simulator
  2. Select Debug -> Location -> Free Drive
  3. Add a breakpoint to CLLocationManager's didUpdateLocations delegate method to catch updates

Credit: https://stackoverflow.com/a/10080178/1048331

You can use something like this https://github.com/futuretap/FTLocationSimulator . Or modify it to better fill your needs.

Edit

(I'm one of the authors:) https://github.com/Azoft/FakeGPSUtility - this project can be helpful too.

Select iPhone Simulator --> Select Debug from menu ---> set Location . You can also give custom location by filling longitude and latitude values.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM