0
爲「UncaughtExceptionHandler的」警告
我用下面的代碼片段在我AppDelegate.m
捕捉異常:避免在AppDelegate中
void uncaughtExceptionHandler(NSException *exception)
{
NSLog(@"CRASH: %@", exception);
NSLog(@"Stack Trace: %@", [exception callStackSymbols]);
}
我怎樣才能避免這樣的警告:
Semantic Issue: No previous prototype for function 'uncaughtExceptionHandler
「?
這是一個C函數,而不是Objective-C方法。它應該是? – trojanfoe
將其聲明爲靜態。完整的解釋在這裏:http://stackoverflow.com/a/12216498/492405 – vcsjones
謝謝你的參考,他們幫助了我很多! – AlexR