是否可以在 Snow Leopard 上获得适用于 Xcode 4.2 的 iOS 5.1 SDK?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9613565/
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-09 04:17:38  来源:igfitidea点击:

Is it possible to get the iOS 5.1 SDK for Xcode 4.2 on Snow Leopard?

xcodexcode4.2osx-snow-leopardios5.1

提问by jpsasi

I still have Snow Leopard. I have Xcode 4.2 for iOS development. This morning I upgraded my iPhone and iPad to iOS 5.1.

我还有雪豹。我有用于 iOS 开发的 Xcode 4.2。今天早上我将我的 iPhone 和 iPad 升级到了 iOS 5.1。

But Xcode 4.2 is not detecting my device for testing. I could not find the iOS 5.1 SDK image on Apple's developer site, for Xcode 4.2.

但是 Xcode 4.2 没有检测到我的设备进行测试。我在 Apple 的开发人员网站上找不到适用于 Xcode 4.2 的 iOS 5.1 SDK 图像。

I don't want to do upgrade to Lion to get XCode 4.3 at this time.

我现在不想升级到 Lion 以获得 XCode 4.3。

Will I able to use Xcode 4.2 (on Snow Leopard) for iOS development now?

我现在可以使用 Xcode 4.2(在 Snow Leopard 上)进行 iOS 开发吗?

回答by Richard Groves

To get Xcode 4.2on Snow Leopard to run code on a device running iOS 5.1you can do this:

要让雪豹上的Xcode 4.2运行 iOS 5.1设备上运行代码,您可以执行以下操作:

  1. If you have another Mac running Lion and Xcode 4.3.1 you can copy the files from:

    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)

  2. Place the copied files in the equivalent place on your Snow Leopard Mac: probably

    /Developer/Platforms/iPhoneOS.platform/DeviceSupport

  3. Similarly copy the iOS 5.1 SDK files found in this directory:

    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk

  4. Also copy 'version.plist' from the Lion machine in the iPhoneOS.platform folder to the Snow Leopard machine.

  5. Re-start Xcode on the Snow Leopard machine and re-connect the devices and it seems happy enough.

  1. 如果您有另一台运行 Lion 和 Xcode 4.3.1 的 Mac,您可以从以下位置复制文件:

    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)

  2. 将复制的文件放在 Snow Leopard Mac 上的等效位置:可能

    /Developer/Platforms/iPhoneOS.platform/DeviceSupport

  3. 同样复制在此目录中找到的 iOS 5.1 SDK 文件:

    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk

  4. 同时将iPhoneOS.platform文件夹中Lion机器中的'version.plist'复制到Snow Leopard机器上。

  5. 在 Snow Leopard 机器上重新启动 Xcode 并重新连接设备,它看起来很高兴。

If you don't have access to a machine with Lion and Xcode 4.3.1:

如果您无法访问装有 Lion 和 Xcode 4.3.1 的机器:

  1. You can get the files out of the 4.3.1 DMGwhich can be downloaded from Apple here: Downloads for Apple Developers.

  2. Mount the DMG, Show Package Contents on the Xcode icon and drill down to

    /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

  3. Follow the steps above.

  1. 您可以4.3.1 DMGApple 此处获取可从Apple下载的文件:Apple Developers 的下载

  2. 挂载 DMG,在 Xcode 图标上显示包内容并深入查看

    /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

  3. 按照上述步骤操作。

You might find it more convenient to use Apple's proprietary dittomethod (sudo ditto src dest) in the terminal window to copy the folders.

您可能会发现在终端窗口中使用 Apple 的专有ditto方法 ( sudo ditto src dest) 来复制文件夹更方便。

Note,this hack will also work for latest iOS 6 SDK.

请注意,此 hack 也适用于最新的 iOS 6 SDK。

回答by Mick MacCallum

You have to get Lion, iOS 5.1 SDK is only for Xcode 4.3.1 which is only available for Lion.

您必须获得 Lion,iOS 5.1 SDK 仅适用于 Xcode 4.3.1,仅适用于 Lion。

... and your Xcode will not be able to build to your device if you have already updated it to 5.1 because it won't be on that version of Xcode's approved SDKs

...如果您已经将 Xcode 更新到 5.1,那么您的 Xcode 将无法构建到您的设备上,因为它不在该版本的 Xcode 批准的 SDK 上

回答by Alex Zavatone

I'm working on this now. I have the same issue.

我现在正在做这件事。我有同样的问题。

The MAJOR PROBLEMS here are that:

这里的主要问题是:

1) Apple never provided a warning dialog that this might disable people developing under Snow Leopard.

1)Apple 从未提供警告对话框,这可能会禁用在 Snow Leopard 下开发的人。

2) There is no easy way to undo this.

2)没有简单的方法可以撤消此操作。

3) This should not happen on a point release update.

3) 这不应该发生在点发布更新上。

I've tried to install the previous ipsw from 5.0.1 for my Gen 4 IPod Touch from here: where to download ipod touch firmware restore linksIt will not install.

我已经尝试从 5.0.1 为我的 Gen 4 iPod Touch 安装以前的 ipsw:从 哪里下载 ipod touch 固件恢复链接它不会安装。

I've downloaded the Lion Xcode 4.3.1 from here (sign in as a developer first) Lion Xcode 4.3.1

我已经从这里下载了 Lion Xcode 4.3.1(首先以开发人员身份登录) Lion Xcode 4.3.1

And run some scripts from the Dev Forums here:

并从这里的开发论坛运行一些脚本:

sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/

sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1\ \(9B176\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/

sudo rm -f ./Latest

sudo ln -s ./5.1\ \(9B176\) ./Latest

Unmounted the Lion DMG and restarted Xcode. This allowed me to test 5.1 in the simulator but broke every build to every device with a SIGABRT or link error.

卸载 Lion DMG 并重新启动 Xcode。这让我可以在模拟器中测试 5.1,但会破坏每个设备的每个构建,并出现 SIGABRT 或链接错误。

I'm off to the Apple store to have them restore my device. If I get any more information, I'll let you all know. This has been a VERY EXPENSIVE and VERY UNPLEASANT surprise.

我要去苹果商店让他们恢复我的设备。如果我得到更多信息,我会让大家知道。这是一个非常昂贵和非常不愉快的惊喜。

回答by dklt

Adding to Richards solution above, I found that if you alsocopy, from XCode 4.3.1 dmg...

添加到上面的理查兹解决方案,我发现如果你复制,从 XCode 4.3.1 dmg ...

edit: updated to correct path within dmg

/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Develope??r/SDKs/iPhoneOS5.1.sdk ~~ (entire directory tree)

编辑:更新为 dmg 中的正确路径

/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Develope??r/SDKs/iPhoneOS5.1.sdk ~~(整个目录树)

to

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/

XCode debugger will startup correctly (without all the error log and dumps)

XCode 调试器将正确启动(没有所有错误日志和转储)

ie:
===============================================================================
warning: Unable to read symbols from "dyld" (prefix __dyld_) (not yet mapped into memory).
warning: Unable to read symbols from "SystemConfiguration" (not yet mapped into memory).
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/Frameworks/MessageUI.framework/MessageUI (file not found).
warning: No copy of dyld found locally, reading from memory on remote device.  This may slow down the debug session.
warning: No copy of <No file name> found locally, reading from memory on remote device.  This may slow down the debug session.
warning: No copy of <No file name> found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration (file not found).
warning: No copy of SystemConfiguration.framework/SystemConfiguration found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/Frameworks/MessageUI.framework/MessageUI (file not found).
warning: No copy of MessageUI.framework/MessageUI found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox (file not found).
warning: No copy of AudioToolbox.framework/AudioToolbox found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/Frameworks/iAd.framework/iAd (file not found).
warning: No copy of iAd.framework/iAd found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices (file not found).
warning: No copy of SpringBoardServices.framework/SpringBoardServices found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/PrivateFrameworks/FTClientServices.framework/FTClientServices (file not found).
warning: No copy of FTClientServices.framework/FTClientServices found locally, reading from memory on remote device.  This may slow down the debug session.
===============================================================================

回答by prossel

There is an answer here that also provides the copy of the simulator v 5.1. No manual operations. Just open the Terminal, copy and paste the provided commands.

这里有一个答案,它也提供了模拟器 v 5.1 的副本。无需手动操作。只需打开终端,复制并粘贴提供的命令。

http://www.iphonedevsdk.com/forum/iphone-sdk-development/100229-snow-leopard-sdk-5-1-a.html

http://www.iphonedevsdk.com/forum/iphone-sdk-development/100229-snow-leopard-sdk-5-1-a.html

回答by hchouhan02

if you want to also add iphone simulator 5.1 to your xcode then copy

如果您还想将 iphone 模拟器 5.1 添加到您的 xcode 中,请复制

/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk

entire directory to the following path =>

整个目录到以下路径=>

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/

after you can also able to use iPhone simulator 5.1 to debug your application.

之后您还可以使用 iPhone 模拟器 5.1 来调试您的应用程序。

回答by Marcin Ignac

You can use apps compiled for 5.0 on your 5.1 or 5.1.1 device by compiling them and manually dragging .app file to iTunes. Tried today on 10.6.8 and XCode 4.2.

您可以在 5.1 或 5.1.1 设备上使用为 5.0 编译的应用程序,方法是编译它们并手动将 .app 文件拖到 iTunes。今天在 10.6.8 和 XCode 4.2 上试过。

回答by booker

Download the iOS 5.0.1 firmware of your device on this link : http://www.iphonefirmware.com/firmwares-download.

在此链接上下载您设备的 iOS 5.0.1 固件:http: //www.iphonefirmware.com/firmwares-download

And do a manual restore on iTunes.

并在 iTunes 上进行手动恢复。

I did it today (March 8) on my iPad 2 and it works, Apple still seems to sign this iOS version.I guess not for a long time, so do it quickly.

我今天(3 月 8 日)在我的 iPad 2 上完成了它并且它有效,Apple 似乎仍然签署了这个 iOS 版本。我想不会很长时间,所以快点吧。

回答by egincyf

I am using Mac OS X 10.6.8 and Xcode 4.2 and also upgraded my iPhone to iOS 5.1. I needed to get a test version onto the device in a hurry yesterday but did't have the time to install Lion and Xcode 4.3.

我正在使用 Mac OS X 10.6.8 和 Xcode 4.2,并将我的 iPhone 升级到 iOS 5.1。昨天我急需将测试版本安装到设备上,但没有时间安装 Lion 和 Xcode 4.3。

I've been using TestFlight (www.testflightapp.com) for beta testing. I created an .ipa archive from Xcode 4.2 and was able to install it on my iOS 5.1 upgraded iPhone via TestFlight.

我一直在使用 TestFlight (www.testflightapp.com) 进行 beta 测试。我从 Xcode 4.2 创建了一个 .ipa 存档,并且能够通过 TestFlight 将它安装在我的 iOS 5.1 升级的 iPhone 上。

I know it's not an ideal solution but it helped me get out of a tight spot yesterday without resorting to hacks.

我知道这不是一个理想的解决方案,但它昨天帮助我摆脱了困境,而无需求助于黑客。

p.s. I'm not affiliated with TestFlight in any way.

ps 我不以任何方式隶属于 TestFlight。

回答by Pochi

It is not possible to use a 5.1 device on xcode 4.2, since you don't want to upgrade, you can use the organizer, select your device, and use the restore feature. You can google for the 5.0.1 version and use that one.

无法在 xcode 4.2 上使用 5.1 设备,因为您不想升级,您可以使用管理器,选择您的设备,并使用恢复功能。您可以在 google 上搜索 5.0.1 版本并使用该版本。

(although upgrading to lion is super cheap)

(虽然升级到 Lion 超级便宜)

EDIT: Seems this is possible, scroll up for the highest voted answer.

编辑:似乎这是可能的,向上滚动以获得最高投票的答案。