美文网首页
CUICatalog: Invalid asset name s

CUICatalog: Invalid asset name s

作者: 朝雨晚风 | 来源:发表于2021-12-16 11:27 被阅读0次
问题:终端输出连续多行如下提示,虽不影响功能但使得终端输出信息多余不清爽影响调试找信息的速度
[framework] CUICatalog: Invalid asset name supplied: ''
[framework] CUICatalog: Invalid asset name supplied: '(null)'
原因:[UIImage imageNamed:@""] 或者 [UIImage imageNamed:nil]造成
解决办法:设置符号断点如图
符号断点
测试代码
@interface ViewController ()
@property (nonatomic, strong) UIImageView *backImageView;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
}

- (void)setupUI {
    self.backImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:nil]];
//    self.backImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@""]];
}

@end
结论:运行如图,找到问题源修改
断点堆栈

相关文章

网友评论

      本文标题:CUICatalog: Invalid asset name s

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