instruments-without-delay uses the DYLD_INSERT_LIBRARIES
environment variable to shim from the instruments command line all the way down to ScriptAgentShim
which is the iOS Simulator service responsible for interfacing UIAutomation JavaScript with the native UIAutomation.framework
. It uses a stack of shims, starting at the instruments
executable, going through Simulator.app
. It is an essential part of ios-driver as it removes a pesky 200ms delay that drastically slows down the process of executing end-to-end tests. This is a fixed cost that would occur on every command.
Other than a few things being moved around and renamed in Xcode 7, there is the new issue of the codesigning of the Simulator app that triggers amfid
whenever an unsigned image is loaded. This essentially means that we can't use DYLD_INSERT_LIBRARIES
on the Simulator Process with SimShim
It is however, possible to inject these environment variables at the launchdaemon level. There is a plist fo