Xcode 4 无法将 iPhone 识别为已配置的设备
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5293177/
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
Xcode 4 not recognizing iPhone as provisioned device
提问by James Skidmore
My iPhone has a green dot in the organizer, runs 4.2.1, and I just updated Xcode to 4.0.
我的 iPhone 在管理器中有一个绿点,运行 4.2.1,我刚刚将 Xcode 更新到 4.0。
When I try to build and run my project on the iPhone, it says that no provisioned devices are connected. It worked in the previous version of Xcode.
当我尝试在 iPhone 上构建和运行我的项目时,它说没有连接任何配置的设备。它适用于先前版本的 Xcode。
I have ensured that the provisioning is up-to-date, and that the project settings have the correct provisioning file selected. I also deleted the Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1
to be sure that's not it.
我已确保配置是最新的,并且项目设置选择了正确的配置文件。我还删除了Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1
以确保不是它。
I would appreciate any help. Thanks!
我将不胜感激任何帮助。谢谢!
采纳答案by James Skidmore
I updated the phone to iOS 4.3, and now it works fine in Xcode.
我将手机更新到 iOS 4.3,现在它在 Xcode 中运行良好。
回答by tiltem
Go to Build Settings of project, and select All in upper right corner, then make sure that the iOS Deployment Target is 4.2(or what ever your device has on it). Then build, it should work.
转到项目的“构建设置”,然后选择右上角的“全部”,然后确保 iOS 部署目标是 4.2(或您的设备上的任何内容)。然后构建,它应该可以工作。
回答by daidai
Make sure you have set the device to "Use in Development" in Organiser.
确保您已在管理器中将设备设置为“在开发中使用”。
回答by Kris Bixler
Is your iPhone showing up in iTunes? I had a similar problem a few weeks ago, spent some time trying to figure out what was wrong with XCode, and then realized that my iPhone wasn't showing up in iTunes either. Turns out that an iTunes update had somehow lost the AppleMobileDevices.kext file.
您的 iPhone 是否出现在 iTunes 中?几周前我遇到了类似的问题,花了一些时间试图找出 XCode 出了什么问题,然后意识到我的 iPhone 也没有出现在 iTunes 中。结果是 iTunes 更新不知何故丢失了 AppleMobileDevices.kext 文件。
I followed the instructions here to completely remove and reinstall iTunes and it fixed my problem: http://support.apple.com/kb/HT1224
我按照此处的说明完全删除并重新安装 iTunes 并解决了我的问题:http: //support.apple.com/kb/HT1224
回答by Adrian Skilling
This has occurred for me. It was confusing the project settings of deployment version with the target setting.
这发生在我身上。它混淆了部署版本的项目设置和目标设置。
So take note that you are changing the deployment version of the specific target you are building (under TARGETS->TargetName) and not just the for the project (PROJECT->ProjectName). The target setting may override the project setting.
因此请注意,您正在更改正在构建的特定目标的部署版本(在 TARGETS->TargetName 下),而不仅仅是项目(PROJECT->ProjectName)的部署版本。目标设置可能会覆盖项目设置。
Set Build Settings with the options "Basic/Levels" to see what the Resolved (actual) setting for the deployment target will be.
使用“基本/级别”选项设置构建设置,以查看部署目标的已解决(实际)设置。
回答by shim
I had a similar problem for a moment, on a device that was previously fine, but I just closed and reopened both iTunes and Xcode and it was fine when I re-opened XCode. Not sure whether closing iTunes fixed it or closing XCode did, but either way it worked for me. Definitely a first step to try if your phone previously worked fine
我在以前很好的设备上遇到了类似的问题,但我刚刚关闭并重新打开 iTunes 和 Xcode,当我重新打开 XCode 时一切正常。不确定关闭 iTunes 是否修复了它或关闭 XCode 是否修复了它,但无论哪种方式都对我有用。如果您的手机以前运行良好,这绝对是尝试的第一步
回答by guest
I have encountered the same problem. Apparently, all I had to do was restart Xcode
我遇到了同样的问题。显然,我所要做的就是重新启动 Xcode