简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM