如何解决ibtool与Main.storyboard错误失败:shouldBeArchived无法识别

我从来没有遇到过这个问题。 该应用程序用于完美运行,但现在它总是说这个错误。 我已经尝试清洁和重新启动。 我已经尝试重置IOS模拟器。 我试图删除派生的数据。

这是xcode构build它所说的:

CompileStoryboard AITEST/Base.lproj/Main.storyboard cd /Users/tinkl/Documents/project-xcode/testProject/AITEST export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:(null)/Users/tinkl/.gem/ruby/2.0.0(null):(null)/Library/Ruby/Gems/2.0.0(null):(null)/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0(null):/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/.. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool --target-device iphone --errors --warnings --notices --module AITEST --minimum-deployment-target 8.1 --output-partial-info-plist /Users/tinkl/Library/Developer/Xcode/DerivedData/AITEST-eyqkoubdyxykegdhwecchlxhuetf/Build/Intermediates/AITEST.build/Debug-iphonesimulator/AITEST.build/Main-SBPartialInfo.plist --auto-activate-custom-fonts --output-format human-readable-text --compile /Users/tinkl/Library/Developer/Xcode/DerivedData/AITEST-eyqkoubdyxykegdhwecchlxhuetf/Build/Products/Debug-iphonesimulator/AITEST.app/Base.lproj/Main.storyboardc /Users/tinkl/Documents/project-xcode/testProject/AITEST/AITEST/Base.lproj/Main.storyboard 2015-06-16 10:44:10.053 ibtoold[20616:447845] -[IBUIViewControllerAutolayoutGuide shouldBeArchived]: unrecognized selector sent to instance 0x7fdd8d4b0d40 /* com.apple.ibtool.errors */ /Users/tinkl/Documents/project-xcode/testProject/AITEST/AITEST/Base.lproj/Main.storyboard: error: Exception while running ibtool: -[IBUIViewControllerAutolayoutGuide shouldBeArchived]: unrecognized selector sent to instance 0x7fdd8d4b0d40 

运行系统:

1:OS X EL Capitan版本,10.11

2:XCode版本6.1(6A1052c)

3:命令工具版本6.1

任何帮助,这将是伟大的。 我也有相当大的故事板。 那很重要吗?

提前致谢!

其他雷霆:

  1. 如果检查stroyboard的UIViewController的autoLayoutclosures,将build立成功。

  2. 如果在故事板中使用UITableViewController使用autolayout,将会build立成功。

这里ibtool版本:

tinkl:〜tinkl $ ibtool –version

捆绑版本1878短捆绑版本6.1

更新我的Xcode版本后,我解决了这个问题。

我在一个老版本的Xcode上工作,然后升级到El Capitan而没有升级Xcode后,遇到了这个问题。

再次升级Xcode后,它工作。

我无法得到这个工作,但我所做的是符号链接到一个新版本的Xcode。 我把6.3.2连接到6.2.0 。 我不确定这样做的意义。

ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool /Applications/Xcode_6.2.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool

当您将任何UI从Storyboard复制到XIB或反之亦然时,通常会发生此问题。 一旦你复制了任何东西,交叉检查XIB是否支持这些东西,就像我从故事板复制任何东西到xib文件,然后有很多不支持的东西(显然是因为storyboard是xib的新版本)这是tableview的原型单元格。

所以只需从UI中删除那些不受支持的东西,就是这样。 它会再次开始工作。

这个错误是由于你和模拟器devise的storyBoard的大小不匹配造成的。 这可以通过两种方式解决,通过更改storyboard的大小或取消select自动布局选项。 Autolayout就像在每个分辨率中一样放置工具。 所以当不匹配发生。 应该修剪,以适应屏幕。 这是这个错误背后的原因。