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

时间:2012-03-08 06:06:28

标签: xcode xcode4.2 osx-snow-leopard ios5.1

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

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

此时我不想升级到Lion以获取XCode 4.3。

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

15 个答案:

答案 0 :(得分:213)

要在Snow Leopard上获取 Xcode 4.2 以在运行iOS 5.1的设备上运行代码,您可以执行以下操作:

  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. 同时将'version.plist'从iPhoneOS.platform文件夹中的Lion机器复制到Snow Leopard机器。

  5. 重新启动Snow Leopard计算机上的Xcode并重新连接设备,看起来很开心。

  6. 如果您无法访问使用Lion和Xcode 4.3.1的计算机:

    1. 您可以从4.3.1 DMG获取文件,可以从 Apple Downloads for Apple Developers下载。

    2. 在Xcode图标上安装DMG,显示包装内容并向下钻取

        

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

    3. 按照上述步骤操作。

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

      注意,这个hack也适用于最新的iOS 6 SDK。

答案 1 :(得分:14)

你必须得到Lion,iOS 5.1 SDK仅适用于Xcode 4.3.1,仅适用于Lion。

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

答案 2 :(得分:14)

我现在正在研究这个问题。我有同样的问题。

这里的主要问题是:

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

2)没有简单的方法来解除这个。

3)点发布更新不应该发生这种情况。

我尝试从此处为我的Gen 4 IPod Touch安装5.0.1之前的ipsw: where to download ipod touch firmware restore links 它不会安装。

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

从Dev Forums运行一些脚本:

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

卸载Lion DMG并重新启动Xcode。这允许我在模拟器中测试5.1但是使用SIGABRT或链接错误将每个构建都打破到每个设备。

我要到Apple商店让他们恢复我的设备。如果我收到更多信息,我会告诉大家。这是一个非常昂贵和非常令人不快的惊喜。

答案 3 :(得分:8)

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

  

编辑:更新以更正dmg

内的路径      

/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Develope R /的SDK / iPhoneOS5.1.sdk   ~~(整个目录树)

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

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.
===============================================================================

答案 4 :(得分:7)

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

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

答案 5 :(得分:5)

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

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

整个目录到以下路径=&gt;

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

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

答案 6 :(得分:5)

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

答案 7 :(得分:4)

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

在iTunes上进行手动恢复。

我今天(3月8日)在我的iPad 2上做了它并且它可以工作,Apple似乎仍然签署了这个iOS版本。我想不会很长时间,所以很快就这样做。

答案 8 :(得分:3)

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

(虽然升级到狮子超级便宜)

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

答案 9 :(得分:3)

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

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

我知道这不是一个理想的解决方案,但它帮助我在昨天没有诉诸黑客的情况下摆脱困境。

P.S。我不以任何方式与TestFlight有关联。

答案 10 :(得分:2)

对于雪豹用户来说,Xcode 4.2似乎不再适用于developer.apple.com :(也适用于像我这样的注册付费iOS开发者......

目前似乎没有合法的方式来获取它......

答案 11 :(得分:2)

你必须添加符号别名...例如在/Developer/Platforms/iPhoneOS.platform/DeviceSupport/6.0 (10A403)中你必须添加指向/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk的符号别名,以便xcode 4.2可以检测你的ios6设备(在mac mini 1.5 intel core solo上测试)用雪豹)。干杯

答案 12 :(得分:1)

我认为您可以在Snow Leopard中测试ios 5.1设备,如上文所述。但升级到Lion并使用官方sdk版本总是安全的。因为我们无法预测如果我们在我们的机器上执行某些“技巧”来实现它会发生什么问题,并且可能在最不需要的时间(例如提交到appstore时)发生。 :)

答案 13 :(得分:1)

截至2012年3月20日撰写之日,Apple并未让人们从5.0.1安装以前的ipsw文件。如果您将设备升级到iOS 5.1,就像我使用gen 4 Touch一样,那么您必须在Xcode 4.2中运行iOS 5.1,或者必须将设备恢复为4.x,或者更换设备。 / p>

我把我的触摸带到Apple Store,然后他们取代了它。

如果您安装ipsw for 5.0.1,Apple的服务器将声明您的设备不允许这样做,您将无法恢复。您必须尝试4.x到您的设备或确保iOS 5.1 SDK在Xcode 4.2中运行。

答案 14 :(得分:0)

我找到了解决方法!

我的系统是Snow Leopard 10.6.8,我有两套Xcode 3.2.5和4.2,在我将iPad 1升级到iOS 5.1后,我启动了Xcode 3.2.5,它提示我一个窗口“发现了未知设备”,我回答“是”从我的iPad下载大量库,几分钟后,我可以在iPad上调试和运行我的项目!

然后我启动了Xcode 4.2并打开了我之前的一个项目,我可以在我的iPad上调试并运行它!

通过这种方式,您可以使用任一版本的Xcode在Snow Leopard系统上开发应用程序。