Xcode 未检测到我的设备

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

Xcode not detecting my device

xcodeipaddevice

提问by Saranya

I upgraded my iPad device OS version recently to 5.1.1 (9B206). From that my Xcode is not detecting my device. Am just getting iOS Device and simulator options in my Xcode. But am getting my device in older version of Xcode and iTunes. For this i updated my MAC OS version to 10.7.4 and Xcode version to 4.3.3. But still am facing the same problem. Now how to make my Xcode to detect my device?

我最近将 iPad 设备操作系统版本升级到 5.1.1 (9B206)。从那以后,我的 Xcode 没有检测到我的设备。我只是在我的 Xcode 中获得 iOS 设备和模拟器选项。但是我的设备正在使用旧版本的 Xcode 和 iTunes。为此,我将 MAC OS 版本更新为 10.7.4,将 Xcode 版本更新为 4.3.3。但仍然面临同样的问题。现在如何让我的 Xcode 检测我的设备?

采纳答案by Andrei Filip

Open the Organizer in Xcode, go to devices, find your device and click the option to use for development

在 Xcode 中打开 Organizer,转到设备,找到您的设备并单击用于开发的选项

回答by user1323362

This Worked for me.

这对我有用。

  • Quit Xcode.
  • Disconnect the device.
  • In a terminal window, type: sudo pkill usbmuxd(it will be restarted again automatically)
  • Restart Xcode
  • Connect the device
  • 退出 Xcode。
  • 断开设备。
  • 在终端窗口中,键入:(sudo pkill usbmuxd它将自动重新启动)
  • 重启Xcode
  • 连接设备

Your device should now be visible again in Xcode!

您的设备现在应该再次在 Xcode 中可见!

回答by Gautam Jain

I just plugged into another USB port and it detected by device.

我刚刚插入另一个 USB 端口,它被设备检测到。

回答by Nianliang

In another case, check the "iOS Deployment Target" in "Build Settings", if the target iOS version number is great than the version of device, then the device will not show in the list.

另一种情况,在“Build Settings”中勾选“iOS Deployment Target”,如果目标iOS版本号大于设备版本号,则该设备不会出现在列表中。

Say that, the "iOS Deployment Target" == 7.0, and the version of device is 6.0, to solve the problem by change the "iOS Deployment Target" to 6.0 or lower.

也就是说,“iOS部署目标”==7.0,设备版本为6.0,通过将“iOS部署目标”更改为6.0或更低版本来解决问题。

回答by Maddy

I was also faced the same issue in Xcode, my device was not detected after update the Xcode latest version(7.3.1)

我在 Xcode 中也遇到了同样的问题,更新 Xcode 最新版本 (7.3.1) 后未检测到我的设备

Done so many things what suggested in the web-search but still the device was not detected.

做了很多网络搜索中建议的事情,但仍然没有检测到设备。

Finally, I just quit and open the Xcode my device was detected(oh my bad).

最后,我只是退出并打开 Xcode 我的设备被检测到(哦,我的坏)。

回答by Nathan Noble

If the chosen answer still does not work for you try this:

如果选择的答案仍然不适合您,请尝试以下操作:

  1. Select the project in project explorer
  2. Select the target on the main window
  3. Select Build Settings
  4. Select Deployment
  5. Select iOS Deployment Target. Change it to the version of your device. (e.g. iOS 5.1)
  1. 在项目资源管理器中选择项目
  2. 在主窗口选择目标
  3. 选择构建设置
  4. 选择部署
  5. 选择 iOS 部署目标。将其更改为您设备的版本。(例如 iOS 5.1)

回答by Richard

Most recently, Xcode 8.3 and iOS 10.3 seems to have more security around Xcode accessing the iPad/iPhone. My sequence:

最近,Xcode 8.3 和 iOS 10.3 似乎在 Xcode 访问 iPad/iPhone 方面具有更高的安全性。我的顺序:

  • Rebooted the machine,
  • Attached the iPad,
  • Gone through a "trust this computer" security cycle on both iMac and iPad
  • Xcode can now see the device
  • 重启机器,
  • 附上iPad,
  • 在 iMac 和 iPad 上都经历了“信任这台电脑”的安全周期
  • Xcode 现在可以看到设备

回答by user1140780

Sometimes restarting Xcode helps. Give it a shot.

有时重新启动 Xcode 会有所帮助。试一试。

回答by Manganese

In my case, restarting Mac worked and no other solution. Not exactly an answer, just adding so that if it may, be helpful for someone else.

就我而言,重新启动 Mac 有效,没有其他解决方案。不完全是一个答案,只是添加以便如果可能的话,对其他人有帮助。

回答by M VIJAY

Just simple, close the project on your XCode. Just right-click on the XCode in the taskbar and give a quit option. After open the XCode from the directory, it will detect your device. It also work on Xcode version 11.2.1

很简单,关闭 XCode 上的项目。只需右键单击任务栏中的 XCode 并给出退出选项。从目录中打开 XCode 后,它将检测您的设备。它也适用于 Xcode 版本 11.2.1

  1. close your project or XCode.
  2. Give Right click on the Xcode in MAC tabbar and give the Quit option.
  3. Reopen the project from your finder(project place).
  1. 关闭您的项目或 XCode。
  2. 在 MAC 选项卡栏中右键单击 Xcode 并提供退出选项。
  3. 从您的查找器(项目位置)重新打开项目。

The device will be automatically detected.

设备将被自动检测。