How to fix ibtool failed with Main.storyboard error: shouldBeArchived unrecognized

时光总嘲笑我的痴心妄想 提交于 2019-12-13 12:07:33

问题


I have never encountered this problem before. The application used to run perfectly but now it always says this error. I have tried cleaning and rebooting. I have tried resetting IOS Simulator. I have tried deleting derived data.

This is what xcode build it says:

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

run system:

1 : OS X EL Capitan version, 10.11

2 : XCode Version 6.1 (6A1052c)

3 : command tools version 6.1

Any help for this would be great. I also have quite a large storyboard. Does that matter?

Thanks in advance!

Other Reault:

  1. if checked stroyboard's UIViewController's autoLayout to off, will build Success.

  2. if use UITableViewController in storyboard use autolayout to on, will build Success.

here ibtool version:

tinkl:~ tinkl$ ibtool --version

bundle-version 1878 short-bundle-version 6.1


回答1:


This issue was resolved for me after updating my Xcode version.

I ran into this issue after working on a project on in an older version of Xcode and upgrading to El Capitan without then upgrading Xcode.

After upgrading Xcode again, it worked.




回答2:


I couldn't get this to work either but what I did was symlink to a newer version of Xcode. I linked 6.3.2 to 6.2.0. I am not sure of the implications of doing this.

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




回答3:


This issue usually occurs when you copy any UI from storyboard to XIB or vice-versa. Once you copy any thing cross check if the things are supported in XIB, like if I copy anything from storyboard to xib file, then there are many thing which are not supported (obviously because storyboard is a newer version of xib) and simple example for this is tableview prototype cell.

So just remove those unsupported things from UI and thats it. It will start working again.




回答4:


This error is caused due to un-matching of size of storyBoard designed by you and of simulator. This can be solved in two ways, by changing size of storyBoard or by de-selecting autolayout option. Autolayout is to place tools as it as in every resolutions. So when mismatching occurs. supposed to be trimmed to fit in screensize. That is the reason behind this error.



来源:https://stackoverflow.com/questions/30858083/how-to-fix-ibtool-failed-with-main-storyboard-error-shouldbearchived-unrecogniz

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!