问题
Is it possible to simulate a location on iOS Device, say I want to simulate London on the device while I am sitting in Oxford?
Thanks.
回答1:
Yes, It is possible to simulate the location on device in debug mode. All you need is to debug your application on device, and then enable the location from debug menu.
Check this link... https://developer.apple.com/library/ios/recipes/xcode_help-debugger/articles/simulating_locations.html
回答2:
You can create a GPX file with the desired location/coordinates and you can enable it from the debugger or from the Project scheme select run/options/"Allow location simulation". After you have this enabled and your device connected the location simulation will work on the device to till you reboot it. A good article that explain this can be found here: https://blackpixel.com/writing/2013/05/simulating-locations-with-xcode.html
回答3:
Maybe this project can help: https://github.com/futuretap/FTLocationSimulator It simulate location sending fake data to the coreLocation.
来源:https://stackoverflow.com/questions/17436495/simulating-a-location-on-real-ios-device