How to Fake a GPS Location on IOS


IPhone X
System: IOS 12.2

MacBook Pro 2018
System: macOS Mojave 10.14.4
IDE: Xcode v10.2

Quick Guide

Create Project

Open your Xcode and Create a new Single View App project.

Get GPS Location

Demo: 清华大学 (40.0033348446,116.3261745921)

Add a gpx file

Replace the latitude and longitude of the location you choose

<?xml version="1.0"?>
<gpx version="1.1" creator="Xcode">
    <wpt lat="40.0033348446" lon="116.326174592">

Edit Scheme

Choose Your Project > Edit Scheme > Options
Check Allow Location Simulation and set Default Location to your gpx file

Connect IPhone and Run Debug


本文作者: Vincent0700
版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!