Xcode 7 beta 使我的应用程序故事板文件无法访问

Xcode 7 beta made my apps storyboard files inaccessible

我安装了 Xcode 7 beta 1,它要求我将代码转换为 Swift 2,我照做了。一切正常,我的应用程序测试目标只有一些问题。当这个问题解决后,我构建了 运行 应用程序,错误说:com.apple.interfacebuilder error 2001 我无法打开 .xib 和 .storyboard 文件。它要么无法打开,要么 Xcode 崩溃。我能做什么?

我通过重新安装 Xcode 6 解决了这个问题,不幸的是,通过将 Swift 2 元素改回 Swift 1,我没有备份。然后我删除了项目中的每个 Nib 或 Xib 文件,但我确实在另一个地图中单独复制了它们。我可以打开这些文件,并将所有内容复制并粘贴到我的项目的新的、替换的 Nib 或 Xib 文件中。 我的测试目标也有问题,我不得不更换它。 希望这对遇到问题的其他人有所帮助。

seancook Jul 21, 2015 5:58 PM (in response to zurb) 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.

来自苹果论坛的解决方案。这对我有帮助!

https://forums.developer.apple.com/thread/11706

XCode 7 beta 4 有这个问题。删除 /Library/Developer/CoreSimulator/Profiles/Runtimes 中的运行时为我解决了 2 个问题:我现在可以再次打开故事板文件,所有模拟器再次显示为目标。 希望对您有所帮助。

在模拟器打开的情况下安装 XCode 7 betaX 时会发生这种情况(至少对我而言)。停止所有(我也删除了运行时,按照这里的一些建议,不确定是否有帮助)并重新启动 XCode.

笔尖可以打开,模拟器回来了。