XCInjectBundle environment variable is set to a Mac path, not device path
| Originator: | josh.hinman | ||
| Number: | rdar://22670074 | Date Originated: | 11-Sep-2015 |
| Status: | Open | Resolved: | |
| Product: | Xcode | Product Version: | Xcode 7.0 (7A218) |
| Classification: | Other Bug | Reproducible: | Always |
In Xcode 6 and prior, when running unit tests on an iOS device, the XCInjectBundle environment variable would be set to a path on the device where the test bundle is located. In Xcode 7, it is set to a path on my Mac where the test bundle exists. Steps: 1. Load an Xcode project that has a unit test target 2. Run the unit tests (⌘-U) 3. From within the application code, inspect the XCInjectBundle environment variable (via NSProcess.environment) Expected results: XCInjectBundle should contain a path on device, e.g. /private/var/mobile/Containers/Data/Application/DB9BF6DD-347F-47F6-A5AB-3781BBB01E3D/tmp/MyAppTests.xctest Actual results: XCInjectBundle contains a path on my Mac, e.g. /Users/me/Library/Developer/Xcode/DerivedData/MyApp-hgnkxzogvhlsnyajqvleqznlcvzm/Build/Products/Debug-iphoneos/MyAppTests.xctest"
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!