XCTest & GPX Files: Can Location Updates Be Started Automatically?

血红的双手。 提交于 2019-12-22 06:22:58

问题


I have added a gpx file to my project; its name is TrailOfHistory.gpx. I have edited my project's scheme so that this file will be used by Xcode 9 to perform locations updates.

Here are screen shots of the scheme's Run and Test configurations wherein I have designated that the gpx file should be used:

When I run my application, user location updates (as given by the gpx file) begin automatically. I can watch this happening on my application's MKMapView.

In contrast, when I run one of my unit tests, user location updates do not begin automatically. I must instead perform the manual step of clicking the debug toolbar's Simulate Location button and choosing the gpx file; as shown in the following screen shot:

My ultimate goal is to arrive at a set of tests that can be executed by a continuous integration system. So, clicking on Xcode buttons is not going to fly.

Can anyone provide insight on this? In particular, can anyone say that he/she has had the experience of creating an XCTest wherein location updates began automatically (if so then I'll proceed with hope; currently I am unclear what expectations I should have)?

Note: I found this very similar question, over a year old. Hopefully I can generate some renewed interest.

来源:https://stackoverflow.com/questions/49437177/xctest-gpx-files-can-location-updates-be-started-automatically

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!