I am looking for a way to set environment while using xcrun. We could set environment via xcrun simctl setenv
prior to Xcode 7.0. Now we can only view environment using xcrun simctl getenv <device> <variable name>
.
I have seen a reference of SIMCTL_CHILD_, but I am not sure how to use it.
xcrun simctl spawn
Usage: simctl spawn [-w | --wait-for-debugger] [-a <arch> | --arch=<arch>] <device> <path to executable> [<argv 1> <argv 2> ... <argv n>]
If you want to set environment variables in the resulting environment, set them in the calling environment with a SIMCTL_CHILD_ prefix.
I know that its a simple thing, and I am missing a tiny piece here.
Really appreciate if someone can help me with this.