如何在IOS真机上设置假GPS位置 [英] How to set fake GPS location on IOS real device

查看:29
本文介绍了如何在IOS真机上设置假GPS位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我必须在真正的 IOS 7 设备上测试应用程序并设置不同的假 GPS 位置.在 Android 上,我使用我的假位置".不幸的是,我没有找到适用于 IOS 7 的相同应用程序.有什么想法可以解决我的问题吗?

Currently I have to test app and set the different fake GPS locations on real IOS 7 devices. On Android I use 'My Fake Location'. Unfortunately, I didn't find the same app for IOS 7. Any ideas to solve my problem?

推荐答案

当然 ios7 禁止在真实设备上创建虚假位置.
出于测试目的,有两种方法:
1)当设备连接到xcode时,使用模拟器并让它播放一个gpx轨道.

Of course ios7 prohibits creating fake locations on real device.
For testing purpose there are two approches:
1) while device is connected to xcode, use the simulator and let it play a gpx track.

2) 对于真实世界的测试,未连接到 simu,一种可能性是您的应用程序具有内置的特殊模式,您将其设置为播放"模式.在这种模式下,应用程序必须自己创建位置,使用 1 秒的计时器,并创建一个新的 CLLocation 对象.

2) for real world testing, not connected to simu, one possibility is that your app, has a special modus built in, where you set it to "playback" mode. In that mode the app has to create the locations itself, using a timer of 1s, and creating a new CLLocation object.

3) 这里描述了第三种可能性:https://blackpixel.com/writing/2013/05/simulating-locations-with-xcode.html

3) A third possibility is described here: https://blackpixel.com/writing/2013/05/simulating-locations-with-xcode.html

这篇关于如何在IOS真机上设置假GPS位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆