ios-control / ios-sim

Command-line application launcher for the iOS Simulator
Apache License 2.0
1.49k stars 253 forks source link

simctl was not found #227

Closed Soben closed 6 years ago

Soben commented 6 years ago

Expected behavior

Run no arguments on ios-sim and load the simulator with default values

Actual behavior.

running ios-sim produces this instead:

simctl was not found.
Check that you have Xcode 8.x installed:
    xcodebuild --versionCheck that you have Xcode 8.x selected:
    xcode-select --print-path

Running xcodebuild --versionCheck fails, but I confirmed I am running XCode 9

I uninstalled and re-installed ios-sim just in case I had a versioning issue, with no luck

removed 13 packages in 0.325s
~ npm install ios-sim -g
/usr/local/bin/ios-sim -> /usr/local/lib/node_modules/ios-sim/bin/ios-sim
+ ios-sim@6.1.2
added 13 packages from 26 contributors in 2.201s

System Specs

shazron commented 6 years ago

This is a simctl issue, see: https://github.com/phonegap/simctl/blob/27193e094e2293b06d5d3536d1f99c4785699fdc/simctl.js#L43

Can you verify what you get when you run xcrun simctl help?

Soben commented 6 years ago

I will keep looking, but yea, when I run that command I get the following error:

$ xcrun simctl help
dyld: Symbol not found: _SimDeviceBootKeyDisabledJobs
  Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/simctl
  Expected in: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
 in /Applications/Xcode.app/Contents/Developer/usr/bin/simctl
[1]    21400 abort      xcrun simctl help

Seems a much larger issue is at play with simctl. I'll see what I can figure out with their documentation, and also consider a full re-install of this as well as xcode, if possible.

Soben commented 6 years ago

XCode apparently was still missing components, even though I've installed those components before.

Looked up the "Symbol not found" and the solution was https://github.com/flutter/flutter/issues/16271 which was to open XCode and expect the dialog to popup that contains something similar to the following:

38372688-57e17984-38e7-11e8-8712-d297989db079

Problem resolved.

nteissler commented 5 years ago

For me it was important to set xcode-select to the right path. If $ xcode-select -p prints /Library/Developer/CommandLineTools, then run sudo xcode-select -s /Applications/Xcode.app to make sure you're using the right path of tools