简体   繁体   English

iOS:XCUITest中的模拟器位置不起作用

[英]iOS: Simulator location in XCUITest not working

The only way to get the simulator to spit back a location is by changing the location in the simulator itself. 使模拟器吐出一个位置的唯一方法是更改​​模拟器本身中的位置。 When I change the settings in the scheme it doesn't seem to do anything. 当我更改方案中的设置时,它似乎没有任何作用。

Am I missing something? 我想念什么吗?

Xcode Version 10.2 (10E125) Xcode版本10.2(10E125)

在此处输入图片说明

This should be the answer: 这应该是答案:

https://willowtreeapps.com/ideas/simulating-location-in-ios https://willowtreeapps.com/ideas/simulation-location-in-ios

Setting it in XCode only won't work, you have to check and set your Simulator->Debug->Location correctly as well. 仅在XCode中设置它无效,您还必须检查并正确设置Simulator-> Debug-> Location。

Oky, after extensive testing on our repo - this is, what you are looking for: 好的,在对我们的存储库进行了广泛测试之后-这就是您要寻找的内容:

https://github.com/JonGabilondoAngulo/idevicelocation https://github.com/JonGabilondoAngulo/idevicelocation

You can use it from console (from CI) to set location to your simulator and it works like a charm :-) 您可以从控制台(从CI)使用它来设置模拟器的位置,它的工作方式就像一个超级魅力:-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM