Trying to set the environment of a Network Extension isn't working

I have a network extension that has an Info.plist with an entry as follows:

<key>XPCService</key>
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>Whatever</key>
<string>Whoever</string>
<key>DYLD_INSERT_LIBRARIES</key>
<string>/usr/lib/libgmalloc.dylib</string>
</dict>
</dict>

It is my understanding that this should set the DYLD_INSERT_LIBRARIES variable. When I dump my environment to the console, however, the variable is not set and guard malloc is clearly not being activated (note also that the Whatever/Whoever variable is also not being set). How can I get Guard Malloc to run for a network extension?
What platform are you testing this on? And, if it’s on macOS, do you have the hardened runtime enabled?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
This is MacOS, and I do not have the hardened runtime enabled.
Is this an appex or a sysex?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
This is an appex network extension.

Hmmm, this worked the list time I tested it. I’m not aware of any specific reason why it would have stopped working on recent systems. Unfortunately I don’t have time to dig into this here on DevForums; I recommend that you open a DTS tech support incident so that Matt or I can investigate this properly.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Trying to set the environment of a Network Extension isn't working
 
 
Q