(xcode 5) ibtool 失败,退出代码为 255

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20531240/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:25:11  来源:igfitidea点击:

(xcode 5) ibtool failed with exit code 255

objective-cxcodeios7

提问by ianM

Does anyone have a fix for this? I've seen other answers but none seem to work for me.

有没有人解决这个问题?我看过其他答案,但似乎没有一个对我有用。

I can run other projects ok - but my current one fails with the above error - for no obvious reason I can think of. Clean runs ok - there are no code errors - building the project causes this.

我可以运行其他项目 - 但我当前的项目因上述错误而失败 - 我想不出明显的原因。Clean 运行正常 - 没有代码错误 - 构建项目会导致此问题。

I'm running xcode 5 - I've tried reinstalling the simulator - rebooting my machine - even my backup of my current project-which was running perfectly - now gets this error.

我正在运行 xcode 5 - 我尝试重新安装模拟器 - 重新启动我的机器 - 甚至是我当前项目的备份 - 运行完美 - 现在出现此错误。

采纳答案by Jorge Diaz

In my case, I also have a TableView as the root controller, and this happened to me when I changed the type content of the TableView from Dynamic to Static while having existing prototype cells on it. Switching back from Static to Dynamic Prototypes fixed the compilation problem. It looks like XCode doesn't handle well this shocking changes in the Storyboard. Avoid this changes once you have Prototype cells on your TableViews.

就我而言,我也有一个 TableView 作为根控制器,当我将 TableView 的类型内容从 Dynamic 更改为 Static 而其上有现有原型单元时,这发生在我身上。从静态切换回动态原型修复了编译问题。看起来 XCode 不能很好地处理故事板中这种令人震惊的变化。一旦您的 TableView 上有 Prototype 单元格,请避免这种更改。

回答by asmaier

I had a similar problem on Xcode 5.1.1 (Mac OS X 10.8.4) and was able to fix it by removing the

我在 Xcode 5.1.1 (Mac OS X 10.8.4) 上遇到了类似的问题,并且能够通过删除

appearanceType="lightContent"

attribute from a <button>tag in the xib file. This I could only figure out by commenting out step by step parts of the xib file until the ibtoolfinally ran without error.

来自<button>xib 文件中标签的属性。这我只能通过一步一步地注释掉xib文件的部分直到ibtool最终没有错误地运行来弄清楚。

回答by pajp

When ibtoolcrashes, there seems to often be an ibtooldcrash causing it. For me it has been fruitful to look at the stack traces of ibtoold in /Library/Logs/DiagnosticReportsto get a clue about why ibtoolcrashes. Today I had crashes that turned out to be fixed by setting "Appearance" to "Default (Aqua)" on an NSWindow in Interface Builder (in the resulting xib this removed the appearanceTypeproperty in the <window/>tag). I figured that out after looking at the following ibtoold crash report:

ibtool崩溃时,似乎经常有ibtoold崩溃导致它。对我来说,查看 ibtoold 的堆栈跟踪/Library/Logs/DiagnosticReports以了解ibtool崩溃原因是很有成效的。今天,我通过在 Interface Builder 中的 NSWindow 上将“外观”设置为“默认(Aqua)”来修复崩溃(在生成的 xib 中,这删除appearanceType<window/>标签中的属性)。在查看以下 ibtoold 崩溃报告后,我发现了这一点:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.dt.IDE.IDEInterfaceBuilderCocoaIntegration        0x000000010db37f09 -[NSObject(IBAppKitObjectIntegration) setIbInspectedAppearanceType:] + 105
1   com.apple.dt.IDE.IDEInterfaceBuilderCocoaIntegration        0x000000010daa39df -[NSWindowTemplate(IBDocumentArchivingGenerator) unarchiveWithDocumentUnarchiver:] + 725
2   com.apple.dt.IDE.IDEInterfaceBuilderKit     0x0000000107b23ffd __51-[IBDocumentUnarchiver unarchiveObjectFromElement:]_block_invoke + 478
3   com.apple.dt.IDE.IDEInterfaceBuilderKit     0x0000000107b2232b -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] + 172

As you can see the crash happened in setIbInspectedAppearanceTypewhich gives a hint on what might be the problematic part of the xib.

正如您所看到的,崩溃的发生setIbInspectedAppearanceType暗示了 xib 可能存在问题的部分。

回答by ianM

I started taking my app apart - gently - bit by bit.

我开始把我的应用程序拆开——轻轻地——一点一点地。

My root controller is a tableVC that connects to 6 other VC's. I deleted the segues to them all - and then - one by one - joined them up again - and narrowed it down to one VC.

我的根控制器是一个连接到其他 6 个 VC 的 tableVC。我将它们全部删除了 - 然后 - 一个接一个 - 再次加入它们 - 并将范围缩小到一个 VC。

The offending VC had a NavBar a couple of buttons and a date picker - so I deleted the NavBar first - tried the segue and it worked again - miraculously - and the app compiled.

违规的 VC 有一个 NavBar 几个按钮和一个日期选择器 - 所以我首先删除了 NavBar - 尝试了 segue 并且它再次工作 - 奇迹般地 - 并且应用程序编译。

I added a new NavBar - and that compiled too.

我添加了一个新的 NavBar - 并且也编译了。

So I will add my buttons again and I think I'm home free!

所以我会再次添加我的按钮,我想我有空了!

Don't know why or how it happened though. (Corrupted NavBar? Deprecated NavBar?)

不知道为什么或如何发生。(损坏的导航栏?不推荐使用的导航栏?)

Hope this helps someone else. There has been a lot of grief around this error.

希望这对其他人有帮助。人们对这个错误感到非常悲痛。

回答by Breeno

For me the diagnostic reports for IBTool were in User Diagnostic Reports and not System Diagnostic Reports, i.e. in /Users//Library/Logs/DiagnosticReports, with filename format "ibtoold_2014-11-04-133617_ComputerName.crash".

对我来说,IBTool 的诊断报告在用户诊断报告而不是系统诊断报告中,即在 /Users//Library/Logs/DiagnosticReports 中,文件名格式为“ibtoold_2014-11-04-133617_ComputerName.crash”。

Application Specific Information: ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-6250/InterfaceBuilderKit/WidgetIntegration/View/IBViewIntegration.m:3076 Details: Creating an out of band arbitration unit with a view () as the root under another view () is not yet implemented. The view would need to be in two arbitration units, the one above for positioning constraints, and the root of the one below for sizing constraints. But then that means that subviews cannot have constraints that affect the size of the view, so the view must have ibExternalTranslatesAutoresizingMaskIntoConstraints set to YES.

Application Specific Information: ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-6250/InterfaceBuilderKit/WidgetIntegration/View/IBViewIntegration.m:3076 详情:在另一个视图()下创建一个以视图()为根的带外仲裁单元是尚未实现。视图需要在两个仲裁单元中,一个用于定位约束,一个用于大小约束,下面一个的根。但这意味着子视图不能具有影响视图大小的约束,因此视图必须将 ibExternalTranslatesAutoresizingMaskIntoConstraints 设置为 YES。

This led me to this post on the Xamarin forums:

这让我在 Xamarin 论坛上看到了这篇文章:

http://forums.xamarin.com/discussion/18971/storyboarding-a-custom-uitableviewcell

http://forums.xamarin.com/discussion/18971/storyboarding-a-custom-uitableviewcell

where Adi Saric has suggested doing a global replace on all translatesAutoresizingMaskIntoConstraints="NO" with an empty string. After wasted hours this finally sorted it for me!

其中 Adi Saric 建议对所有 translatesAutoresizingMaskIntoConstraints="NO" 进行全局替换,并使用空字符串。经过几个小时的浪费,这终于为我整理了它!

回答by user3771696

Look to DiagnosticReportsin /Library/Logs/DiagnosticReportsand get what kind of element you have the problem with (NSWindow, NSView…). It looks like this:

期待DiagnosticReports/Library/Logs/DiagnosticReports,并得到什么样的元素,你有问题,( NSWindowNSView...)。它看起来像这样:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 com.apple.dt.IDE.IDEInterfaceBuilderCocoaIntegration 0x000000010c7c6109 -[NSObject(IBAppKitObjectIntegration) setIbInspectedAppearanceType:] + 105 1 com.apple.dt.IDE.IDEInterfaceBuilderKit 0x00000001067cdd91 -[NSView(IBDocumentArchivingGenerator) unarchiveWithDocumentUnarchiver:] + 654

线程0失事::调度队列:com.apple.main线程0 com.apple.dt.IDE.IDEInterfaceBuilderCocoaIntegration 0x000000010c7c6109 - [NSObject的(IBAppKitObjectIntegration)setIbInspectedAppearanceType:] + 105 1 com.apple.dt.IDE.IDEInterfaceBuilderKit 0x00000001067cdd91 - [ NSView(IBDocumentArchivingGenerator) unarchiveWithDocumentUnarchiver:] + 654

Check all properties you use in this element (for me it was Aqua, i deleted it and all my problems were solved)

检查你在这个元素中使用的所有属性(对我来说它是 Aqua,我删除了它,我所有的问题都解决了)

回答by UglyBlueCat

Clean build folder fixed this issue for me.

干净的构建文件夹为我解决了这个问题。

Of course that won't be the answer for everyone, but it's a good place to start :)

当然,这不是每个人的答案,但这是一个很好的起点:)