Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install a specific iPhone simulator SDK version in XCode?

A couple weeks ago I was working on a project that referenced the iPhoneSimulator 8.2 SDK. Today I went to continue work on the project and suddenly I can't run the simulator. I receive the following error message:

ERROR! Can't locate iPhoneSimulator SDK 8.2 at `/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk'

Sure enough, the simulator SDK doesn't exist in that directory anymore. So I opened up XCode, went to the downloads window and saw it wasn't installed anymore. I have no idea how that happened, but I'm guessing XCode updated itself and removed it. So, I download and install the 8.2 SDK again. However, when it finished, my project still wouldn't run: I received the exact same error. Upon inspection of the file system, I see that XCode actually installed the 8.3 SDK, not 8.2, even though the XCode GUI says it installed 8.2.

I'm running XCode 6.3 (which is weird because I see 6.3 was only released a couple days ago and I haven't installed or upgraded XCode in over a month).

Is there a way to download a specific version of the iPhoneSimulator SDK and manually install it?

like image 723
user2719094 Avatar asked Apr 13 '15 20:04

user2719094


1 Answers

You run an iOS Simulator runtime in the iOS Simulator You build against an iOS Simulator SDK.

Unfortunately this is confusing because the SDK and runtime are located at the same place inside the Xcode.app bundle.

What you want to do is build against the latest iOS Simulator SDK (iOS 8.3 as of Xcode 6.3) and run your app in a simulated device with the iOS 8.2 simulator runtime.

You can install the iOS 8.2 simulator runtime from within Xcode by going to Xcode -> Preferences -> Downloads.

like image 147
Jeremy Huddleston Sequoia Avatar answered Oct 21 '22 16:10

Jeremy Huddleston Sequoia