xcrun from XCTest

Is it possible to execute an xcrun command from XCTest when targeting iOS?

Access to xcrun simctl during test setup could be extremely valuable. For example,
  1. Post a notification to the simulator

  2. Reset the simulator's privacy settings (to request the dialog again)

  3. Add media to the simulator

  4. Manipulate the keychain to skip login

  5. Open a URL directly without having to jump through hoops



This is possible when the target is macOS via Process(), but that doesn't exist for an iOS Test Host. And trying to dynamically load the class crashes the bundle.
xcrun from XCTest
 
 
Q