xcode 您的 iPhone 不可用。请选择其他设备并重试

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

Your iPhone is not available. Please select a different device and try again

iosxcodewatchos-2

提问by samturner

I'm getting the following error when I try to build my Watch OS 2 app on my iPhone (iOS 9.0b2) which is paired to my Apple Watch (watchOS 2.0b2).

当我尝试在与 Apple Watch (watchOS 2.0b2) 配对的 iPhone (iOS 9.0b2) 上构建 Watch OS 2 应用程序时,出现以下错误。

Your iPhone is not available. Please select a different device and try again.

您的 iPhone 不可用。请选择其他设备,然后重试。

I've tried all the obvious things, restarting iPhone, Watch, Mac, etc. All my software is updated to the latest version and my watch is paired to my iPhone. Does anyone have any ideas?

我已经尝试了所有显而易见的事情,重新启动 iPhone、Watch、Mac 等。我所有的软件都更新到最新版本,我的手表与我的 iPhone 配对。有没有人有任何想法?

回答by roninSTI

Connect the phone and open itunes. Once the "trust this iphone" sequence is complete via itunes, the phone will be recognized in xcode.

连接手机,打开itunes。一旦通过 iTunes 完成“信任此 iphone”序列,手机将在 xcode 中被识别。

回答by Vick Swift

Here's how I resolved the issue.

这是我解决问题的方法。

1) Disconnect your iPhone device out of your laptop completely.

1) 将 iPhone 设备与笔记本电脑完全断开。

2) Close Xcode and launch it back up again.

2)关闭Xcode并再次启动它。

3) Wait till Xcode finish indexing

3)等到Xcode完成索引

4) Choose a different scheme (say YourProjectTest scheme) and one of your iPhone simulators.

4) 选择不同的方案(比如YourProject测试方案)和你的 iPhone 模拟器之一。

5) Clean one more time, Build, and then Run your app.

5) 再清理一次,构建,然后运行您的应用程序。

6) Now connect your device, switch Schemes back to the original (YourProjectscheme), and choose your specific device you just connected to run your app on.

6) 现在连接您的设备,将 Schemes 切换回原始(YourProject方案),然后选择您刚刚连接的特定设备来运行您的应用程序。

7) Run the app and you should be golden.

7)运行应用程序,你应该是金色的。