xcode 你可以在 IOS7.1 SDK 中使用 XCode6.3

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24037810/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:59:55  来源:igfitidea点击:

Can you use XCode6.3 with IOS7.1 SDK

iosxcodeios7xcode6

提问by Jeef

Is it possible to use XCode6 beta with an IOS 7.1 SDK? The new tools are much nicer but I need to build for IOS7

是否可以将 XCode6 beta 与 IOS 7.1 SDK 一起使用?新工具要好得多,但我需要为 IOS7 构建

回答by Raja Rao

Yes. 1. First download 7.1 SDK - XCode6Beta > Preferences > Downloads > iOS 7.1 Simulator.

是的。1. 首先下载 7.1 SDK - XCode6Beta > Preferences > Downloads > iOS 7.1 Simulator。

Note:XCode6-Beta can co-exist with regular XCode (XCode 5.x). But when you download iOS 7.1 Simulator, it actually gets downloaded into XCode 5's path!! (probably a bug).

注意:XCode6-Beta 可以与常规 XCode (XCode 5.x) 共存。但是当您下载 iOS 7.1 Simulator 时,它实际上会被下载到 XCode 5 的路径中!!(可能是一个错误)。

  1. Open XCode5's SDKs folder.. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
  2. Open XCode6-beta's SDKs folder..
    /Applications/Xcode6-Beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
  3. Copy iPhoneOS7.1.sdk from XCode5's to XCode6-Beta's SDK folder.
  4. Restart XCode6-beta
  1. 打开 XCode5 的 SDKs 文件夹.. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
  2. 打开 XCode6-beta 的 SDKs 文件夹..
    /Applications/Xcode6-Beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
  3. 将 iPhoneOS7.1.sdk 从 XCode5 复制到 XCode6-Beta 的 SDK 文件夹。
  4. 重启 XCode6-beta

Now if you go to Project's Build Settings, Base SDK, you will see 7.1 along with 8.0.

现在,如果您转到 Project 的 Build Settings、Base SDK,您将看到 7.1 和 8.0。

Enjoy!enter image description here

享受!在此处输入图片说明

回答by Fabio Napodano

I'm using XCode6 and SDK version 8 regularly now, but I had to compile an app with version 7 of SDK, because version 8 was causing a lot of problems on devices with iOS8 installed, while in devices with iOS7 installed everything was running fine.. (!!)

我现在经常使用 XCode6 和 SDK 版本 8,但我不得不用版本 7 的 SDK 编译一个应用程序,因为版本 8 在安装了 iOS8 的设备上引起了很多问题,而在安装了 iOS7 的设备上一切运行良好..(!!)

I then:

然后我:

  • went to XCode Downloads
  • browsed through some pages in order to get the latest XCode 5 version and downloaded it
  • opened the DMG with Image Mounter
  • rightclicked XCode icon and selected "Show package contents"
  • browsed Finder through Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
  • copied iPhoneOS7.sdk and pasted it to /Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
  • restart XCode
  • now you can select SDK 7.1 as the one to use in your project
  • XCode 下载
  • 浏览了一些页面以获得最新的 XCode 5 版本并下载它
  • 使用 Image Mounter 打开 DMG
  • 右键单击 XCode 图标并选择“显示包内容”
  • 通过 Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ 浏览 Finder
  • 复制 iPhoneOS7.sdk 并粘贴到 /Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
  • 重启 XCode
  • 现在您可以选择 SDK 7.1 作为在您的项目中使用的

this has immediately solved all of my issues with the app

这立即解决了我使用该应用程序的所有问题

回答by Mark Semsel

From the command line, you can copy the 7.1 SDK from the current Xcode distribution to the Xcode 6 Beta distribution like this:

从命令行,您可以将 7.1 SDK 从当前 Xcode 发行版复制到 Xcode 6 Beta 发行版,如下所示:

cp -r /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/

The example above will recursively copy the contents of the iPhoneOS7.1.sdk folder to the appropriate destination for Xcode6-Beta5 . Copying the SDK to Xcode6-Beta6 would require adjusting the command line to point to the Xcode6-Beta6.app folder.

上面的示例将递归复制 iPhoneOS7.1.sdk 文件夹的内容到 Xcode6-Beta5 的适当目的地。将 SDK 复制到 Xcode6-Beta6 需要调整命令行以指向 Xcode6-Beta6.app 文件夹。

回答by Andrew McGrath

So we had a very similar issue, our goal was to debug an issue that only appears on iOS 8 (with an app built in xCode 5 on the iOS 7.1 SDK). We were trying to use xCode 6, but found it too unstable, and then decided to go back to xCode 5 and debug using UIAlertNotifications (as we could previously not connect our iOS 8 device to xCode 5)

所以我们遇到了一个非常相似的问题,我们的目标是调试一个只出现在 iOS 8 上的问题(在 iOS 7.1 SDK 上使用 xCode 5 内置的应用程序)。我们尝试使用 xCode 6,但发现它太不稳定,然后决定返回 xCode 5 并使用 UIAlertNotifications 进行调试(因为我们以前无法将我们的 iOS 8 设备连接到 xCode 5)

After connecting our iOS 8 device to xCode 6, when we re-opened xCode 5, our iOS 8 device was recognized and we were able to debug using NSLog statements (break points still caused our app to crash - making it apparent that the issues related to break points are with iOS 8 rather than xCode 6 as others have suggested)

将我们的 iOS 8 设备连接到 xCode 6 后,当我们重新打开 xCode 5 时,我们的 iOS 8 设备被识别,我们能够使用 NSLog 语句进行调试(断点仍然导致我们的应用程序崩溃 - 很明显问题相关断点是使用 iOS 8 而不是其他人建议的 xCode 6)

I hope this info is of some help to others out there!

我希望这些信息对其他人有所帮助!