简体   繁体   English

在Xcode 5中,即使我在SDKs目录中有iOS SDK 6.1,如何使用iOS SDK 7.0进行构建?

[英]In Xcode 5, how can I build with iOS SDK 7.0 even though I have iOS SDK 6.1 in SDKs directory?

I have upgraded Xcode 4.6.x to 5 today. 我今天已经将Xcode 4.6.x升级到了5。 Before I did, I backed iPhoneOS SDK 6.1 in Xcode 4.6.x up for placing it to 'SDKs' directory of Xcode 5 after upgrading. 在此之前,我备份了Xcode 4.6.x中的iPhoneOS SDK 6.1,以便在升级后将其放置到Xcode 5的“ SDKs”目录中。 I really need to keep an old version of SDK for my app to build with 6.1 SDK. 我真的需要保留旧版本的SDK,以便我的应用程序可以使用6.1 SDK进行构建。 Because I didn't fix it compatible with iOS 7 environment yet. 因为我尚未修复它与iOS 7环境兼容的问题。

I upgraded it and copy the old SDK to 'SDKs' directory of Xcode 5. then I was able to see 'iOS 6.1' option at [Build Settings - Base SDK]. 我对其进行了升级,并将旧的SDK复制到Xcode 5的“ SDKs”目录中,然后在[Build Settings-Base SDK]中可以看到“ iOS 6.1”选项。 I also expect that my app can be built with one of SDKs with an option I choose. 我也希望我的应用可以使用其中一个选择的SDK构建。

When I chose 6.1 SDK, It works well. 当我选择6.1 SDK时,它运行良好。 But, 7.0 SDK didn't. 但是,7.0 SDK没有。 I choose 7.0 SDK to use brand new features of iOS 7, but Xcode 5 actually uses 6.1 SDK. 我选择7.0 SDK以使用iOS 7的全新功能,但Xcode 5实际上使用6.1 SDK。

Why does Xcode 5 always select 6.1 SDK rather than 7.0 SDK? 为什么Xcode 5总是选择6.1 SDK而不是7.0 SDK?

You have to do three things. 您必须做三件事。

  1. Clean your project. 清理您的项目。
  2. Reset the simulator. 重置模拟器。
  3. Quit the simulator. 退出模拟器。

Now run your project in Xcode 5. 现在,在Xcode 5中运行您的项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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