Xcode 不会检测到设备
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10569073/
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 won't detect device
提问by SNV7
I'm having a bit of an issue testing my app using my iPhone. Last week I upgraded to Xcode 4.3. I was able to test my apps on my iPhone (which was running iOS 4.3). Today I upgraded my iPhone to iOS 5.1 and now Xcode wont detect my iPhone (btw SDK is 5.1).
我在使用 iPhone 测试我的应用程序时遇到了一些问题。上周我升级到 Xcode 4.3。我能够在我的 iPhone(运行 iOS 4.3)上测试我的应用程序。今天我将我的 iPhone 升级到了 iOS 5.1,现在 Xcode 无法检测到我的 iPhone(顺便说一句,SDK 是 5.1)。
I'm not too sure what to do, I've even tried changing the Deployment target in Xcode back down to 4.3, but still nothing.
我不太确定该怎么做,我什至尝试将 Xcode 中的部署目标更改回 4.3,但仍然没有。
回答by Henri Normak
Make sure the device is "Enabled for development" under Organizer in Xcode. I've seen cases, where Xcode doesn't recognise the device, because it wasn't setup to be a development device.
确保设备在 Xcode 的 Organizer 下处于“启用开发”状态。我见过 Xcode 无法识别设备的情况,因为它没有设置为开发设备。
回答by Snowcrash
I had this problem but my device was already enabled for development. Here are the steps I took to get it working.
我遇到了这个问题,但我的设备已启用开发。以下是我为使其工作而采取的步骤。
If you want to cheat, try the last step. That's what got it working for me!
如果您想作弊,请尝试最后一步。这就是它对我来说有效的原因!
Try restarting both Xcode and the device. Separately.
Make sure you're using the latest iOS SDK under Base SDK (in Targets / Projects > Build Settings) and that it's a greater version that what's running on your device
Check Project > Build Settings > iOS Deployment Target is less or equalto what's on your device.
尝试重新启动 Xcode 和设备。分别地。
确保您在 Base SDK(在目标/项目 > 构建设置中)下使用最新的 iOS SDK,并且它是您设备上运行的更高版本
检查项目 > 构建设置 > iOS 部署目标是否小于或等于您设备上的内容。
It turned out, when I'd created a new project, it had chosen an iOS Deployment Target greaterthan my device version.
事实证明,当我创建一个新项目时,它选择的 iOS 部署目标大于我的设备版本。