安装 Xcode 7 后,我无法再构建和 运行 项目,因为文档无法打开
After installing Xcode 7 I can't build and run projects anymore as document fails to open
编辑:此问题涉及 Xcode 7 的预发布版本,因此如果您是 运行 当前发布的版本,则可能不相关,因为某些问题可能已得到修复。
我得到以下信息:
Failed to connect with the iOS agent. Please file a bug report at
bugreport.apple.com.
这是为什么?
如果我查看详细信息,我会得到:
=================================
ERROR:
Failed to find or create execution context for description
System content
1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity
(Failure reason: Software caused connection abort): Failed to find
newest available Simulator runtime (Failure reason: Software caused
connection abort): Simulator verification failed. (Failure reason: A
connection to the simulator verification service could not be
established.)
Error Domain=NSPOSIXErrorDomain Code=53 "Failed to find or create
execution context for description
System content
1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity"
UserInfo=0x7fcf5961ebd0 {NSLocalizedDescription=Failed to find or
create execution context for description
System content
1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity,
NSUnderlyingError=0x7fcf58b72950 "Failed to find newest available
Simulator runtime"}
尝试删除并重新安装您的 Xcode beta,它在 Xcode beta 3
上对我有效
确认您有最新的 Xcode Beta 安装,打开 Xcode-beta 打开点击 "About Xcode" 并检查内部版本号。
然后在 Xcode 下载页面上检查最新 Xcode-beta 的当前内部版本号:
我 运行 遇到与 xcode 7 beta 3 相同的问题。
我将我的部署目标设置为 8.3。将其设置为 9.0,清理构建并重新启动 xcode 对我有用。
看来这是一个普遍的问题。在 Apple 的开发者论坛上找到了答案:
https://forums.developer.apple.com/thread/11706
如果 link 死机或您无法访问,这是公认的答案:
Correct Answer by seancook on Jul 21, 2015 5:58 PM
I experienced this, too, on El Capitan. NIBs wouldn't load, no Sims
present, and unable to launch Simulators through the Xcode/Open
Developer Tool/Simulator menu. After fighting it for a few hours I've
finally got it working. Here's what worked for me (YMMV): I
noticed a message in Console.app along the lines of the Simulator
runtime not being code signed. I went to the path it described
"/Library/Developer/CoreSimulator/Profiles/Runtimes" and removed the
runtimes that I had there. They were old runtimes, so I assume that
some check in Xcode now applies that didn't previously. Who knows?
After doing this, I could finally launch the Simulator via the
Xcode/Open Developer Tool menu. Unfortunately, the Simulator still
wasn't being shown as a run target in my workspace, so I kept
spelunking... I then went into the Simulator's
Hardware/Devices/Manage Devices menu and added a new iOS9 device. It
didn't seem to do anything, so I quit out of Xcode and Simulator.app.
I then re-started Simulator.app (via Xcode/ODT/Simulator) and lo and
behold the expected iOS9 simulators were displayed. I closed and
re-opened Xcode, changed the target OS for my project, and the Sims
were finally displayed as run targets.
HTH.
我在 Xcode 7.0 发布版本 (7A220) 上遇到了这个错误。我在设备上 运行 根本没有使用模拟器。
我完全清理了 清理构建文件夹... 选项,关闭 Xcode 然后打开 Activity 监视器。我发现了一堆 Ibtool 进程 运行。我终止了所有这些并重新启动 Xcode.
一切又开始了!
我不确定接受哪个答案对我来说有效的是安装更高版本的测试版(测试版 5)。几个月前我向 Apple 提交了一个错误,所以我认为他们通过更新 Xcode 解决了这个问题。
有人在当前的官方版本中遇到过这个问题吗?
我post暂时将此作为答案,但如果有人有更详细的解释,我很乐意删除我的答案并接受你的答案。
首先,您的堆栈跟踪没有显示任何与我找到的答案相关的信息,但是,我的堆栈跟踪似乎也与我无关。但它对我有用,希望对你有用:
苹果工作人员给出了答案:
https://forums.developer.apple.com/thread/3978
说的是"We saw this in the labs at WWDC. The crash was caused by an offending custom color picker. Try removing any custom color pickers you have installed on your system"
简而言之,从您的系统中删除相关的颜色选择器,关闭 xcode 并重新启动。
我要检查的另一件事是您使用的命令行。
我不得不使用不同的版本,我将它们更改为:
sudo xcode-select --switch /Applications/Xcode8.app/Contents/Developer/
(您也可以在XCode/Preferences/Location中更改它)
我认为我的问题是我使用的是 8.1 版
您可以看到您正在使用的命令行:
xcode-select -p
编辑:此问题涉及 Xcode 7 的预发布版本,因此如果您是 运行 当前发布的版本,则可能不相关,因为某些问题可能已得到修复。
我得到以下信息:
Failed to connect with the iOS agent. Please file a bug report at bugreport.apple.com.
这是为什么?
如果我查看详细信息,我会得到:
=================================
ERROR:
Failed to find or create execution context for description System content 1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity (Failure reason: Software caused connection abort): Failed to find newest available Simulator runtime (Failure reason: Software caused connection abort): Simulator verification failed. (Failure reason: A connection to the simulator verification service could not be established.)
Error Domain=NSPOSIXErrorDomain Code=53 "Failed to find or create execution context for description System content 1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity" UserInfo=0x7fcf5961ebd0 {NSLocalizedDescription=Failed to find or create execution context for description System content 1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity, NSUnderlyingError=0x7fcf58b72950 "Failed to find newest available Simulator runtime"}
尝试删除并重新安装您的 Xcode beta,它在 Xcode beta 3
上对我有效确认您有最新的 Xcode Beta 安装,打开 Xcode-beta 打开点击 "About Xcode" 并检查内部版本号。
然后在 Xcode 下载页面上检查最新 Xcode-beta 的当前内部版本号:
我 运行 遇到与 xcode 7 beta 3 相同的问题。
我将我的部署目标设置为 8.3。将其设置为 9.0,清理构建并重新启动 xcode 对我有用。
看来这是一个普遍的问题。在 Apple 的开发者论坛上找到了答案:
https://forums.developer.apple.com/thread/11706
如果 link 死机或您无法访问,这是公认的答案:
Correct Answer by seancook on Jul 21, 2015 5:58 PM
I experienced this, too, on El Capitan. NIBs wouldn't load, no Sims present, and unable to launch Simulators through the Xcode/Open Developer Tool/Simulator menu. After fighting it for a few hours I've finally got it working. Here's what worked for me (YMMV): I noticed a message in Console.app along the lines of the Simulator runtime not being code signed. I went to the path it described "/Library/Developer/CoreSimulator/Profiles/Runtimes" and removed the runtimes that I had there. They were old runtimes, so I assume that some check in Xcode now applies that didn't previously. Who knows?
After doing this, I could finally launch the Simulator via the Xcode/Open Developer Tool menu. Unfortunately, the Simulator still wasn't being shown as a run target in my workspace, so I kept spelunking... I then went into the Simulator's Hardware/Devices/Manage Devices menu and added a new iOS9 device. It didn't seem to do anything, so I quit out of Xcode and Simulator.app. I then re-started Simulator.app (via Xcode/ODT/Simulator) and lo and behold the expected iOS9 simulators were displayed. I closed and re-opened Xcode, changed the target OS for my project, and the Sims were finally displayed as run targets.HTH.
我在 Xcode 7.0 发布版本 (7A220) 上遇到了这个错误。我在设备上 运行 根本没有使用模拟器。
我完全清理了 清理构建文件夹... 选项,关闭 Xcode 然后打开 Activity 监视器。我发现了一堆 Ibtool 进程 运行。我终止了所有这些并重新启动 Xcode.
一切又开始了!
我不确定接受哪个答案对我来说有效的是安装更高版本的测试版(测试版 5)。几个月前我向 Apple 提交了一个错误,所以我认为他们通过更新 Xcode 解决了这个问题。
有人在当前的官方版本中遇到过这个问题吗?
我post暂时将此作为答案,但如果有人有更详细的解释,我很乐意删除我的答案并接受你的答案。
首先,您的堆栈跟踪没有显示任何与我找到的答案相关的信息,但是,我的堆栈跟踪似乎也与我无关。但它对我有用,希望对你有用:
苹果工作人员给出了答案: https://forums.developer.apple.com/thread/3978
说的是"We saw this in the labs at WWDC. The crash was caused by an offending custom color picker. Try removing any custom color pickers you have installed on your system"
简而言之,从您的系统中删除相关的颜色选择器,关闭 xcode 并重新启动。
我要检查的另一件事是您使用的命令行。
我不得不使用不同的版本,我将它们更改为:
sudo xcode-select --switch /Applications/Xcode8.app/Contents/Developer/
(您也可以在XCode/Preferences/Location中更改它)
我认为我的问题是我使用的是 8.1 版
您可以看到您正在使用的命令行:
xcode-select -p