在 OS X El Capitan 上将项目迁移到 Xcode 7.2 会破坏构建 [英] Migrating project to Xcode 7.2 on OS X El Capitan breaks the build
问题描述
我之前使用 Xcode 7.1 运行 OS X Mavericks,我刚刚更新到 OS X El Capitan 和 Xcode 7.2.我的应用程序在模拟器和设备上运行良好,没有任何故事板警告.现在我看到了一堆关于情节提要中缺少约束的警告,并且应用程序因此错误而崩溃:
由于未捕获的异常NSInvalidUnarchiveOperationException"而终止应用,原因:无法实例化名为 IBNSLayoutConstraint 的类"
我还尝试了此处发布的解决方案:
实际上您使用的不是 Storyboard,而是 Xib.在您的文件中,您会发现以下部分:
<exclude reference="6fq-cy-xp8"/></掩码>
您需要将 .xib
作为源代码"打开并删除它们,以便安装
约束.
I was running OS X Mavericks before with Xcode 7.1, I just updated to OS X El Capitan and Xcode 7.2. My app was launching fine on the simulator and device without any kind of warnings for storyboard. Now I see a bunch of warnings for missing constraints in storyboard and the app crashes with this error:
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named IBNSLayoutConstraint'
I also tried the solution posted on here : Could not instantiate class named IBNSLayoutConstraint
I couldn't find placeholder="YES" anywhere in xml and my storyboard is too big to actually go through each constraint to see if I by mistake have turned on Placeholder checkbox for any constraint.
I do see the following warnings when viewing xml of the storyboard.
You're in fact not using a Storyboard, but a Xib. In your file you'll find sections such as this:
<mask key="constraints">
<exclude reference="6fq-cy-xp8"/>
</mask>
You'll want to open your .xib
as "Source Code" and remove these so that the constraints become installed
.
这篇关于在 OS X El Capitan 上将项目迁移到 Xcode 7.2 会破坏构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!