使用 XCode 4.2 未检测到带有 iOS 5.1 的 iPhone
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9661361/
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
iPhone with iOS 5.1 not detected with XCode 4.2
提问by iOSDev
My XCode 4.2 does not detect iPhone with iOS 5.1. I have MAC OS X 10.6.7 installed, with XCode 4.2 and iPhone with 5.1
我的 XCode 4.2 没有检测到装有 iOS 5.1 的 iPhone。我安装了 MAC OS X 10.6.7,XCode 4.2 和 iPhone 5.1
If I build app for iOS 5.0 it works, but not 5.1.
如果我为 iOS 5.0 构建应用程序,它可以工作,但不能用于 5.1。
I want to submit my app to appstore today, will it be accepted?
我想今天提交我的应用程序到应用商店,它会被接受吗?
And How do I run app on 5.1 devices?
以及如何在 5.1 设备上运行应用程序?
Please help
请帮忙
Following are my device config:
以下是我的设备配置:
Developer Information:
开发者信息:
Version: 4.2 (4C199) Location: /Developer Applications: Xcode: 4.2 (828) Instruments: 4.2 (4233) Dashcode: 3.0.2 (336) SDKs: Mac OS X: 10.6: (10K549) iPhone OS: 5.0: (9A334) iPhone Simulator: 3.2: (7W367a) 4.0: (8A400) 4.1: (8B117) 4.2: (8C134) 4.3: (8F192) 5.0: (9A334)
版本:4.2 (4C199) 位置:/Developer Applications:Xcode:4.2 (828) Instruments:4.2 (4233) Dashcode:3.0.2 (336) SDKs:Mac OS X:10.6:(10K549) iPhone OS:5.0:(9A334) ) iPhone 模拟器: 3.2: (7W367a) 4.0: (8A400) 4.1: (8B117) 4.2: (8C134) 4.3: (8F192) 5.0: (9A334)
回答by JoePasq
According to the developer center Xcode 4.3.1 supports iOS 5.1. The last release of Xcode for OS 10.6 is Xcode 4.2 which supports iOS 5 (this is the release you have).
根据开发者中心的说法,Xcode 4.3.1 支持 iOS 5.1。用于 OS 10.6 的 Xcode 的最后一个版本是 Xcode 4.2,它支持 iOS 5(这是您拥有的版本)。
You need to upgrade to Mac OS 10.7 and Xcode 4.3 to get support for iOS 5.1. You can continue to use the 5.0 SDK and build against that as long as you don't need features in iOS 5.1.
您需要升级到 Mac OS 10.7 和 Xcode 4.3 才能获得对 iOS 5.1 的支持。只要您不需要 iOS 5.1 中的功能,您就可以继续使用 5.0 SDK 并针对它进行构建。
I assume that your phone will continue to not be recognized by Xcode until you upgrade your SDK/Xcode to 5.1.
我假设在您将 SDK/Xcode 升级到 5.1 之前,Xcode 将继续无法识别您的手机。
回答by hieund
You have to install latest iOS version (5.1) to your xcode to detect your ios5.1 devices. But it does not included in xcode4.2 installer, so you have to upgrade your OS to 10.7.
您必须将最新的 iOS 版本 (5.1) 安装到您的 xcode 才能检测您的 ios5.1 设备。但它不包含在 xcode4.2 安装程序中,因此您必须将操作系统升级到 10.7。
There is a way to install iOS sdk 5.1 to your xcode 4.2 running on Mac OS X 10.6.x.
有一种方法可以将 iOS sdk 5.1 安装到在 Mac OS X 10.6.x 上运行的 xcode 4.2。
First, you have to download latest xcode installer here(mine is xcode_4.3.1_for_lion.dmg, you may have to login to download)
首先,您必须在此处下载最新的 xcode 安装程序(我的是 xcode_4.3.1_for_lion.dmg,您可能需要登录才能下载)
Open terminal (Application->Utilities->Termial) and type these commands:
打开终端(Application->Utilities->Termial)并输入以下命令:
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/
sudo rm -f /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest
cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
sudo ln -s ./5.1\ \(9B176\) ./Latest
Restart you xcode and now it works.
重新启动您的 xcode,现在它可以工作了。
回答by RedRoosterMobile
There is a hack the I confirmed working. For further reading check IOS 5.1 on XCode 4.2 Snow Leopard
有一个黑客我确认工作。如需进一步阅读,请查看XCode 4.2 Snow Leopard 上的 IOS 5.1
回答by Topsakal
If you upgraded your iPhone/iPad to 5.1 but do not want to upgrade your XCode and Mac OS. Here is a work around for you to be able to still install your app to your testing device:
如果您将 iPhone/iPad 升级到 5.1,但不想升级您的 XCode 和 Mac OS。以下是您仍然能够将您的应用安装到您的测试设备的解决方法:
Sign up to testflightapp.com, upload your app to testflightapp.com and then download it to your device over the air.
注册 testflightapp.com,将您的应用上传到 testflightapp.com,然后通过无线方式将其下载到您的设备。
By this, you can postpone upgrading to Mac OS 10.7 and Xcode 4.3 for a while. You will not be able to debug/put break points on your app while testing on the device though.
这样,您可以暂时推迟升级到 Mac OS 10.7 和 Xcode 4.3。但是,在设备上进行测试时,您将无法在应用程序上调试/设置断点。
回答by Raj iOS
The above suggestion by prajul does work. Just connect the 5.1 device and authenticate xcode 3.2.5 to collect the details. Then once it starts collecting your xcode4.2 will be able to run the device that has os version 5.1. I got it worked in ipad with ios 5.1.1.
prajul 的上述建议确实有效。只需连接 5.1 设备并验证 xcode 3.2.5 即可收集详细信息。然后一旦它开始收集您的 xcode4.2 将能够运行具有 5.1 版操作系统的设备。我让它在带有 ios 5.1.1 的 ipad 中工作。
回答by danfelabs
These steps might only be helpful to people with access to XCode4.2
and XCode 4.3
both.
Was easy for us, as we have iMac with XCode 4.3
and a MBP with SnowLeopard - XCode 4.2
这些步骤可能只对有权访问XCode4.2
和XCode 4.3
两者的人有帮助。对我们来说很容易,因为我们有iMac with XCode 4.3
一个 MBPSnowLeopard - XCode 4.2
XCode 4.3
, Sync provisioning profiles from Organizer-Add Device to Provisioning Portal
XCode 4.3
, run the application on the device- Unplug the device with
iOS 5.1
and connect toXCode 4.2
XCode 4.3
, 从 Organizer 同步配置文件-Add Device to Provisioning Portal
XCode 4.3
, 在设备上运行应用程序- 拔下设备
iOS 5.1
并连接到XCode 4.2
回答by prajul
This thing worked for me
First I ran the project in xcode 3.2.5and the project ran on iOS 5.1!!!!*Later i disconnected the device and again ran the project on xcode 4.2*on snow leopard and it started working with out nay problem.Dont know how this worked
I was having snow leopard and old xcode 3.2.5
这件事对我
有用首先我在 xcode 3.2.5 中运行该项目,而该项目在 iOS 5.1 上运行!!!!*后来我断开了设备的连接并再次在 xcode 4.2*上在雪豹上运行该项目,它开始工作,没有任何问题。不知道这
是如何工作的,我有雪豹和旧的 xcode 3.2.5