UPDATED FOR Xcode 7
In Xcode 7.0, I have not been able to install or uninstall apps with simctl.
And there is a typo in the simctl help:
$ xcrun simctl help
...
get_app_container Print the path of the **intsalled** app's container
...
Reproduce
$ export DEVICE=F24BE4F9-36C5-4842-84A4-1EA2614B8A3E
$ export APP=/path/to/CalSmoke-cal.app
$ xcrun simctl boot $DEVICE
$ xcrun simctl install $DEVICE $PATH
Expected
To see the app installed on the target simulator.
Found
The command hangs indefinitely. Xcode 7 GM
$ xcrun simctl install $DEVICE $PATH
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
The APP does exist at path.
The Simulator log shows that `backboard` is not loaded; that log message repeats indefinitely.
$ tail -f ~/Library/Logs/CoreSimulator/F24BE4F9-36C5-4842-84A4-1EA2614B8A3E
stern CoreSimulatorBridge[8316]: Requesting installation of file:///Users/moody/git/calabash/ios-smoke-test-app/CalSmokeApp/CalSmoke-cal.app/ with options: {
CFBundleIdentifier = "sh.calaba.CalSmoke-cal";
PackageType = Developer;
SimulatorRootPath = "/Xcode/7.0/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk";
SimulatorUserPath = "/Users/moody/Library/Developer/CoreSimulator/Devices/F24BE4F9-36C5-4842-84A4-1EA2614B8A3E/data";
}
stern CoreSimulatorBridge[8316]: LaunchServices: installing app for existing placeholder <LSApplicationProxy: 0x7fd5e3700580> sh.calaba.CalSmoke-cal <(null) *Not found in database*>
stern CoreSimulatorBridge[8316]: LaunchServices: Not creating progress for <LSApplicationProxy: 0x7fd5e3700580> sh.calaba.CalSmoke-cal <(null) *Not found in database*> since it is not a placeholder.
stern installd[8290]: 0x112481000 -[MIClientConnection installPath:withOptions:completion:]: Install of "/Users/moody/git/stern installd[8290]: 0x111bfc000 -[MIInstaller _extractPackageWithError:]: Did not construct delta; doing full copy for installation.
stern SpringBoard[8300]: BSXPCMessage received error for message: Connection invalid
--- last message repeated 1 time ---
stern SpringBoard[8300]: -[BKSSystemApplicationClient queue_connectionWasInvalidated] backboardd is not loaded; waiting for it to return.
stern SpringBoard[8300]: BSXPCMessage received error for message: Connection invalid
--- last message repeated 1 time ---
stern SpringBoard[8300]: -[BKSSystemApplicationClient queue_connectionWasInvalidated] backboardd is not loaded; waiting for it to return.
stern ***[8341]: LaunchServices: Currently 0 installed placeholders: (
)
stern SpringBoard[8300]: BSXPCMessage received error for message: Connection invalid
--- last message repeated 1 time ---
stern SpringBoard[8300]: -[BKSSystemApplicationClient queue_connectionWasInvalidated] backboardd is not loaded; waiting for it to return.
Regression
- Xcode 6.0 - 6.4 - works as expected.
- Xcode 7.1 beta 1 - same result as Xcode 7.0 GM
- The same behavior occurs with any app.
Notes
If the app is already installed and I try to uninstall, the command also hangs.
The software I maintain requires that I have many side-by-side installations of Xcode (back to Xcode 5.1.1). They are installed like this:
/Xcode/5.1.1/Xcode.app
...
/Xcode/6.4/Xcode.app
/Xcode/7.0/Xcode.app
/Xcode/7.1b1/Xcode-beta.app
- I have restarted my machine several times.
- The app can be built and installed from any Xcode.
- The app can be installed and launched with instruments from any Xcode.
- I tried with --noxpc (something I don't usually do).
- I ensured that all simulators were launched at least once and ensured they have finished installing their content.
MacOS Yosemite 10.10.5 (14F27)
Nope, that is not supported. If it worked in Xcode 6, that was a quirk of the implementation (likely older iOS versions didn't need backboardd to do the install). backboardd is not included when booting up the simulator from the command line. You need to boot the device in Simulator.app. I've duped your radar to the one tracking adding this feature.