您的当前位置:首页正文

iOS iPhone 修改手机定位远程打卡

来源:华拓网

目标:

修改当前的手机定位,然后打开你们公司那个打卡的软件,然后点击打卡

申明:不建议你这么做,纯技术好玩,并且没有什么难度

缺点:不越狱的话就只能是debug模式玩玩了;越狱的可以随时随地可配置的做成一个软件,然后为所欲为的修改定位了

准备工作

1.xcode +iPhone
2.打开或者新建一个iOS 项目工程
3.在项目里新增一个GPX File

新增GPX文件.png
输入GPX文件名.png 这个文件名是你后面要用的

然后在项目里GPX文件的内容是这样的

<?xml version="1.0"?>
<gpx version="1.1" creator="Xcode">
    
    <!--
     Provide one or more waypoints containing a latitude/longitude pair. If you provide one
     waypoint, Xcode will simulate that specific location. If you provide multiple waypoints,
     Xcode will simulate a route visiting each waypoint.
     -->
    <wpt lat="37.331705" lon="-122.030237">
        <name>Cupertino</name>
        
        <!--
         Optionally provide a time element for each waypoint. Xcode will interpolate movement
         at a rate of speed based on the time elapsed between each waypoint. If you do not provide
         a time element, then Xcode will use a fixed rate of speed.
         
         Waypoints must be sorted by time in ascending order.
         -->
        <time>2014-09-24T14:55:37Z</time>
    </wpt>
    
</gpx>

你需要做的是把GPX文件里面的内容换成下面这样

<?xml version="1.0" encoding="UTF-8" ?>
<gpx version="1.1"
    creator="GMapToGPX 6.4j - 
    
    
     
    <wpt lat="30.219072" lon="120.172615">//修改成你想要的经纬度(这里的坐标值要记得转化)
    </wpt>
</gpx>

准备好了就开始看效果了

1command+R
2等APP起来后
3点击xcode菜单栏---->Debug ---->Simulate Location---->ChangeYourLocation

ChangeYourLocation 就是你前面输入的GPX的文件名
此时在切到其他APP看下当前位置已经改变了

binggo~
打开你的打卡软件打卡就好了