NSString *exceptionInfo = [NSString stringWithFormat:@"\n\n[%@][Crash]\nException reason: %@\nException name: %@\nException stack: %@",[NSDate date], name, reason, stackArray];
CrashLogCollector *c = [CrashLogCollector manager];
objc_msgSend(c, @selector(writeLogFile:), exceptionInfo);
这段代码的第三行报错了,错误信息是:Too many arguments to function call, expected 0, have 3
查到一种解决方案是选中项目 - Project - Build Settings - ENABLE_STRICT_OBJC_MSGSEND 将其设置为 NO 即可
这种做法是有效的,但是在一个功能单一的测试工程中,即使Build Settings设置为YES,也是能够编译通过的。
尚不明原因。