[英]How can I avoid XCode resetting the location on my iPhone every time it runs
Every time I run XCode, my location is being reset to a location in London. 每次运行XCode时,我的位置都会重置为伦敦的某个位置。 It doesn't recover until I reset my device.
在重置设备之前,它无法恢复。
How do I avoid this? 我该如何避免这种情况?
This took me a month or two to spot and track down, so I am posting for the benefit of others. 这花了我一两个月的时间来发现和追踪,所以我发帖是为了别人的利益。 as Apple Customer Support were unable to diagnose it, and even went so far as to swap my device for a new one- which of course didn't help.
由于Apple客户支持无法对其进行诊断,甚至甚至将我的设备更换为新设备 - 这当然没有帮助。 There was nothing about this on Google.
Google上没有这方面的内容。
I eventually diagnosed it by setting "Find My Friends" to geofence my real location and send a message when it spotted me leave. 我最终通过设置“寻找我的朋友”来确定它,以便对我的真实位置进行地理定位,并在发现我离开时发送消息。 The second I started running my app on Xcode it pinged instantly.
第二个我开始在Xcode上运行我的应用程序,它立即ping。
There is a setting in XCode that sets the GPS to a chosen dummy location whenever you run your app. XCode中有一个设置,可以在您运行应用程序时将GPS设置为所选的虚拟位置。 It can be found by selecting Product>Scheme>Edit Scheme from the top menu, then select "Run appname" on the left and "Options" at the top.
通过从顶部菜单中选择产品>方案>编辑方案,然后选择左侧的“运行appname”和顶部的“选项”,可以找到它。 The one you want is "Core Location: Allow Location Simulation."
你想要的是“核心位置:允许位置模拟”。
Just uncheck that box. 只需取消选中该框即可。 Problem solved.
问题解决了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.