Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I get "xcrun: error: SDK "iphonesimulator" cannot be located" when running the toolchain

Tags:

xcode

ios

kivy

I am trying to compile a Kivy program onto iOS, but when I run the command to build the Kivy distro I keep getting this error:

xcrun: error: SDK "iphonesimulator" cannot be located

I have xcode on my computer. What is going on?

like image 573
user992286 Avatar asked Sep 19 '16 02:09

user992286


People also ask

Why can’t I find SDK “iphoneOS” on my Mac?

If you’ve stumbled upon this post, it most likely means that you’re getting this error: SDK “iphoneos” cannot be located when trying to run a pod installor perform similar command-line tasks from a Mac terminal while working on a XCode project. This is a typical scenario when you update a lot of stuff together – such as XCode and CocoaPods.

Can I install an older iOS simulator SDK in Xcode?

Legacy iOS Simulator SDKs no longer ship with the latest versions of Xcode. To install an older Simulator SDK, take the iPhoneSimulator.sdk directory from an older version of Xcode ( Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/‌​iPhoneSimulator.sdk ), and copy it to your newer version.

Why is XCode not installing on my Mac?

If XCode is installed, you should see a wronginstallation path, such as/Library/Developer/or something like that: it’s very likely that your XCode installation is located somewhere else – such as in the /Applications/folder. If that’s so, you can fix your issue by typing the following command: Shell

How to fix Xcode keeps crashing issue?

To fix this issue is very simple, you can fix this using the command line, or by using the Xcode application itself. make sure “Command Line Tools” has an entry. If not, click on the dropdown and select one (preferably the latest version).


2 Answers

A bit late, but I had the same error experimenting with kivy and this helped me: Open in XCode Preferences, tab into Locations and take a look at your Command Line Tools selection. Mine was empty. When I changed it to the current used version suddenly the error was gone. I found this solution here (bottom): https://groups.google.com/forum/#!topic/rubymotion/Xw8gPcr2Fl8

If there is still something missing you can try to download an older IOS version to be sure there is something installed. Next to your appname you can select the device, click on it and select Download Simulations... and select the IOS you wish. I have done this step before the above, so I don't know if it's necessary.

like image 50
bonsaifan Avatar answered Oct 19 '22 16:10

bonsaifan


sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/

reason: if you download the xcode more than one version . the path is not only one....

like image 18
Qun Li Avatar answered Oct 19 '22 16:10

Qun Li