Open AndreyBelym opened 7 years ago
This is interesting - one of the reasons I chose fbsimctl
is because it will wait for devices to boot before returning. The low-level xcrun simctl
tool will just return immediately and you have no idea if you can ask the device to open a URL yet.
I suppose it would be good to catch failures and throw a nicer error back to the user.
Does this happen for you repeatedly? I found that the first time I booted a device it would be very slow, but it would start quickly on the second or third try.
Ah I see, the Simulator opens correctly (and quite quickly), but fbsimctl
keeps waiting, as it is checking for services that will never start on older iOS versions.
Our options are:
xcrun simctl boot
directly, then check that the desired services start using xcrun spawn launchctl list
IMHO it would be nice to implement 2. while we are waiting for 1. 😃 I will send a PR, if you are not against it.
That would be great! I did have a version of this working in an early prototype of the plugin, so if you get stuck / bored / busy let me know and I'll take over.
I'll leave this open as a reminder to check on fbsimctl's progress - this is fixed by @AndreyBelym in 0.0.4.
Found it when tried to use
fbsimctl:iPhone 4s:iOS 8.1
.testcafe
hangs for some time, then aborts execution with theUnable to start the browser. ... Command failed: fbsimctl {UUID} boot
error . The reason is here: https://github.com/facebook/FBSimulatorControl/issues/368