xcode 更新到 4.0 后“未连接任何已配置的 iPhone OS 设备”

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

"No provisioned iPhone OS device is connected" after update to 4.0

iphonexcodeprovisioningios4

提问by Bojan Milankovic

I updated my iPhone to the new OS 4.0 and went to build my iPhone app and everything built ok, but the message I got at the end was "No provisioned iPhone OS device is connected". Looking at the Xcode organiser, it shows my connected device with an amber icon next to it, and all my provisioning profiles show up as "Installed" but also with an amber icon.

我将我的 iPhone 更新到新的 OS 4.0 并开始构建我的 iPhone 应用程序,一切正常,但最后我得到的消息是“没有连接配置的 iPhone OS 设备”。查看 Xcode 管理器,它显示我连接的设备旁边有一个琥珀色图标,我的所有配置文件都显示为“已安装”,但也有一个琥珀色图标。

Is there something I need to do to make the existing provisioning profiles work since updating to OS 4.0?

更新到 OS 4.0 后,我需要做些什么才能使现有的配置文件正常工作?

I have XCode 3.1.3, and 10.5.8 OS. I can not install XCode 3.2.3, because for that I would need 10.6.2 OS which I do not have.

我有 XCode 3.1.3 和 10.5.8 操作系统。我无法安装 XCode 3.2.3,因为为此我需要 10.6.2 操作系统,而我没有。

So, how do I continue developing and debugging as I used to before I said "yes" to the update dialog on my iPhone, without buying a new OS or new iPhone?

那么,在我对 iPhone 上的更新对话框说“是”之前,我如何继续开发和调试,而无需购买新的操作系统或新的 iPhone?

Thank you for your help.

感谢您的帮助。

EDIT1: I do not want to develop for iOS 4.0.

EDIT1:我不想为 iOS 4.0 开发。

回答by Stephen Darlington

You need to install Xcode 3.2.3 if you have a device with iOS4, whether you want to use iOS4 features or not.

如果您有 iOS4 的设备,无论您是否想使用 iOS4 功能,都需要安装 Xcode 3.2.3。

Apple don't support downgrading your phone to earlier version of the OS, though there are ways of doing it. Your only "official" option is to move to Snow Leopard I'm afraid. (Though it's worth doing anyway)

Apple 不支持将您的手机降级到早期版本的操作系统,尽管有一些方法可以做到。恐怕你唯一的“官方”选择是搬到雪豹。(虽然无论如何都值得做)

回答by tc.

They're all wrong.

他们都错了。

All you needis /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0 (8A293)(it might be called just "4.0" in future releases). Grab it from a computer with 4.0 installed, or, or extract it from the install package (Pacifist, or lsbom/cpio/ditto), or whatever.

您所需要的只是/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0 (8A293)(在未来的版本中可能仅称为“4.0”)。从安装了 4.0 的计算机上获取它,或者从安装包(Pacifist,或 lsbom/cpio/ditto)中提取它,或其他任何东西。

GDB doesn't like being run without symbols though, so also grab a copy of /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk(EDIT:I haven't tried this either, but it ought to work provided the object file format hasn't changed much). This will also let you attemptto compile for 4.0, but I haven't checked if it works (I don't know if 3.1.3's GCC supports "blocks").

不过,GDB 不喜欢在没有符号的情况下运行,因此还可以获取/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk编辑:我也没有尝试过,但是如果目标文件格式没有太大变化,它应该可以工作)。这也会让你尝试编译 4.0,但我没有检查它是否有效(我不知道 3.1.3 的 GCC 是否支持“块”)。

EDIT:All that said, it's going to be easier if you just bite the bullet and upgrade. You need to compile against 4.0 if you want certain features like having your app backgrounded instead of killed (-[UIApplicationDelegate applicationDidEnterBackground:]).

编辑:所有这一切,如果你只是咬紧牙关并升级,它会更容易。如果您想要某些功能,例如让您的应用程序后台运行而不是终止 (-[UIApplicationDelegate applicationDidEnterBackground:]),您需要针对 4.0 进行编译。

回答by ohho

XCode 3.2.3 is required to develop iOS 4 apps.

开发 iOS 4 应用程序需要 XCode 3.2.3。

回答by Philippe Leybaert

If you want to develop for iOS 4, you should be running Mac OS 10.6 (Snow Leopard), and you have to install the iOS 4 SDK.

如果你想为 iOS 4 开发,你应该运行 Mac OS 10.6 (Snow Leopard),并且你必须安装 iOS 4 SDK。

回答by Nithin

Make sure you have iTunes 9.2 if you are connecting an iOS4 device. The device won't be detected even in xcode if its os is 4.0 and you are still using an older version of iTunes.

如果您连接的是 iOS4 设备,请确保您有 iTunes 9.2。如果设备的操作系统是 4.0 并且您仍在使用旧版本的 iTunes,则即使在 xcode 中也不会检测到该设备。

回答by Jim Wolf

I had the same problem after upgrading phone to iOS 4.2 I had to:

将手机升级到 iOS 4.2 后我遇到了同样的问题,我不得不:

  • upgrade XCode to 3.2.5
  • reboot phone with XCode not running, as described above.
  • bring up XCode, Window, Organizer, and when in the view for
    • Jim'sPhone, Summary (I think) or
    • Provisioning Profiles or something, Sorry-- I forget which...
  • 将 XCode 升级到 3.2.5
  • 如上所述,在 XCode 未运行的情况下重启手机。
  • 调出 XCode、窗口、管理器,以及何时在视图中
    • 吉姆的电话,摘要(我认为)或
    • 供应配置文件或其他东西,对不起 - 我忘记了哪个......

Given the warning similar to "XCode doesn't have debugging information for this version of iOS"

鉴于类似于“XCode 没有此版本 iOS 的调试信息”的警告

==> select "Collect"

==> 选择“收集”

Keep Organizer in view to see progress... it takes a minute or two. After I did that, I was able to build and install/debug.

保持管理器在视野中以查看进度……需要一两分钟。在我这样做之后,我能够构建和安装/调试。

回答by user255607

A simple tip: force removal of device with right-click on the device where the amber dot is ("Remove from Organzer"). Reconnect again and the device should be accepted.

一个简单的提示:通过右键单击琥珀色点所在的设备(“从 Organzer 中移除”),强制移除设备。再次重新连接,设备应该被接受。

回答by Evan Moran

There are two things you need to do:

您需要做两件事:

  1. Make sure your XCode is up-to-date.
  2. Reboot your iOS.
  1. 确保您的 XCode 是最新的。
  2. 重启你的 iOS。

For some reason updating the OS makes it confused as to its provisioning profile until it it reboots.

出于某种原因,更新操作系统会使它对其配置文件感到困惑,直到它重新启动。