This is a creation in Article, where the information may have evolved or changed.
Recently Pokemon Go Fire not, the result people server can't carry, only accept GPS location information in Australia client landing request. Today I have a small demo, on the jailbreak of the iphone on the system's GPS positioning information to change.
Steps:
On theXcode8-betanew Blank ProjectEdit schemeDefault Location----Australia--and device selection machine, Run
Paste_image.png
Now, look at your cell phone (I'm the IOS10 system):
1.:
Paste_image.png
2. German map:
Paste_image.png
3. System camera take a photo to see location information
Paste_image.png
4. Find My iphone
Paste_image.png
Now the drawback is that even if the app is deleted, GPS location information is fake, you need to remove the app restart phone to restore the normal GPS. Demo I put on GitHub on Https://github.com/sueLan/RYFakeGPS.
The free developer account can also be used to debug Http://www.jianshu.com/p/540e722b8eff on the real machine.
Early fake GPS This provides virtual positioning information applications. Labour has not been studied before. Some people reverse Weibo and modify the location letter at run time. But the premise of these methods is that you have a jailbreak device. Quora also discussed earlier, how to modify the GPS location information on the device without jailbreak. Each way God recruit: heavy-duty Cllocationmanager method, install GPS repeater fake GPS signal, device agent, iOS simulator debug mode ......
GPS positioning principle
Let's start with a blog, iOS positioning principle. I copied a paragraph:
GPS Positioning principle: This is the United States military, the dual-use, but still completely under the military control (such as can be anywhere to set the signal received or not and its accuracy), the principle is: the use of the Sky satellite (a total -Continuously broadcast the signal, the ground GPS receiving equipment received a signal, by analyzing multiple satellite signals, you can calculate the earth coordinates, GPS to ensure that any place in the world (98%) can both receive at least4Satellites, so you can accurately determine your latitude and longitude and altitude position. GPS positioning accuracy up toTenWithin meters, but this is controlled by the U.S. military, may become unstable during the war or false alarm. (But our country also has its own system, Beidou system, now has Asia's coverage, still in the promotion) satellite positioning must be able to receive satellite signals, because the satellite signal is very weak, although the iphone4The sensitivity of the GPS hardware has been increased, but it still needs to be used by the window or outdoors to ensure the strength and stability of the satellite signal. Compared with base station positioning and WiFi positioning, GPS consumes the most power, the slowest speed, but the highest precision. The iphone's GPS is different from the purely GPS positioning, called A-gps, which is the auxiliary GPS. (better than GPS, but GPs also chip and performance, not to say that all the AGPS than all GPs are good) because the most time-consuming GPS positioning, the most power is to obtain the current satellite information in the sky, which satellites are visible, where, how many clocks, etc., the process may take several 10 seconds or even a few minutes, And aGPS is the use of the network, the base station location or WiFi location to obtain the approximate location to the remote server, a server to query and calculate, the location of the current satellite information, feedback to iOS devices, iOS devices can directly use this information to accept satellite signals, do not have to scan the analysis. This can greatly improve the positioning speed and shorten the initial positioning time to1~2Seconds to complete. A-gps Advantage is that the location is fast, the disadvantage is the need of the network, but also only in the initial positioning needs of the network, because once the satellite information back, in a limited time and range, the information does not need to change, and then the GPS location will no longer require networking, are directly using these satellite parameters to receive information. On the iOS device, the above positioning method will be integrated application, generally, may first follow the fastest "no network base station location" return to a location, when there is network connection, in the use of network Base station location update location, and then, using AGPS Internet Query Satellite star Chart, finally, in the case of receiving GPS signal, Switch to GPS positioning. Depending on the current signal situation and the network environment, iOS may iterate iteratively between the above methods, not necessarily consistent with specific steps or methods, and as iOS upgrades, the positioning order and rules may change.
GPX FILES
GPX (GPS Exchangeformat, GPS interchange) is a universal GPS data format designed for application software in an XML format. It can be used to describe road points, trajectories, distances. It is used to save location, altitude and time.
Paste_image.png
Xcode also uses GPX files to store location information. Therefore, we can also customize a GPX file to simulate arbitrary location information.
Paste_image.png
Https://blackpixel.com/writing/2013/05/simulating-locations-with-xcode.html
Https://github.com/whilethis/location-simulation
Most apps use the system's core location API, Cllocationmanager, when locating information.
Paste_image.png
However, after all apps have called location services, they get the location information of the default position that I selected in the Fakegps project. Why? Some say it's bughttp://stackoverflow.com/questions/14285453/xcode-default-simulated-location.
Paste_image.png
All kinds of associations ...
Wen/Blue (Jane book author)
Original link: http://www.jianshu.com/p/6b1a2bf25c4c