Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
310 views
in Technique[技术] by (71.8m points)

ios - Swift does not support the SDK 'iPhoneSimulator9.3.sdk'?

I have just installed the xcode 8.0 and upgrade my project to swift 3. I was using swift 2.2 and xcode 7.3.1.

But getting following error:

Swift does not support the SDK 'iPhoneSimulator9.3.sdk'

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This happened to me when I had simultaneously installed both Xcode 7 and 7.3 and after automatic update I was left with 8.0 only.

One indication that something got messed up was output of xcodebuild -sdk -version in terminal:

DVTSDK: Warning: SDK path collision for path '<DVTFilePath:0x7fd810db4c50:'/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk'>': SDK with name 'watchos3.0' being superceded by SDK with 'watchos3.0'.

Solution:

  1. Quit Xcode
  2. go to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
  3. remove the iPhoneOS9.3.sdk folder from that directory. Be sure to make an external copy if you still need it so you can put it back later.
  4. restart Xcode, clean, and build
  5. ???
  6. PROFIT

UPDATE:

According to @tsafrir comment, delete also 'iPhoneOS9.3.sdk' for simulator folder: /Applications/Xcode.app/Contents/Developer/Platforms/iPhon??eSimulator.platform/??Developer/SDKs


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...