I have an environment variable set in an xctestplan for a set of unit tests that I access like so:
let testType = ProcessInfo.processInfo.environment[TARGET_TEST_TYPE_KEY]
This is always is always returning nil when I run my unit tests in Xcode 26, but seems to work as expected in Xcode 16.4. Were there any changes in Xcode 26 that changes how this works?
Thanks in advance.
Ok, I think I got it to work. I think I was using the wrong build scheme. It appears to work when selecting the test scheme in xcode before running the tests. I think previously xcode would automatically switch schemes, or at least a prompt would appear asking if I wanted to switch schemes, I could be wrong, though.
Thanks.