Xcode Scheme Default Location is ignored in Tests

Originator:bohdan.koshyrets
Number:rdar://40215516 Date Originated:May 14 2018
Status:Closed (dublicate of 32205624) Resolved:
Product:Xcode Product Version:Xcode 9.3 (9E145)
Classification: Reproducible:
 
Summary:
When I run the app on a simulator, it correctly applies the simulated location when I choose it in Xcode. However, when I run my UI tests, the simulated location I chose in scheme is not applied. I can apply the desired simulated location with the dropdown in Xcode. However, in order to set up automated tests, the scheme needs to properly apply the target simulated location since there is no way to set the simulated location from the test scripts. 

Steps to Reproduce:
In a project go to Scheme list > Edit scheme... > Test and then choose needed location in Test Location section. Then launch any UI test that requires location.

Expected Results:
A UI test will receive simulated location.

Actual Results:
A UI test doesn't receive simulated location.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!