美文网首页
报错: 'Could not load NIB in b

报错: 'Could not load NIB in b

作者: 小生不怕 | 来源:发表于2018-10-28 23:12 被阅读129次

项目突然闪退,xcode log 日志: 'Could not load NIB in bundle: 'NSBundle </Users/lbs/....... .app > (loaded)' with name 'PSActivatePointsView'' 。然后Xcode全局断点是断在代码

PSActivatePointsView *activatePointsView = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(PSActivatePointsView.class) owner:self options:nil] firstObject];

上。
网上搜了很多资料众说纷纭,一一试了还是没有解决。最后通过git版本回滚得知,可能是某次移动或者删除再添加该xib文件的过程中,该文件从Xcode 的Buid Phases的Copy Bundle resources一栏中丢失了。把它添加回来就可以了,如图:


添加丢失的xib.png

相关文章

网友评论

      本文标题:报错: 'Could not load NIB in b

      本文链接:https://www.haomeiwen.com/subject/etcvtqtx.html