iPeta iPeta - 2 months ago 256
Objective-C Question

NSLog on devices in iOS 10 / Xcode 8 seems to truncate? Why?

Why the console output shows incomplete in Xcode 8 / iOS 10?

enter image description here

Answer

A temporary solution, just redefine all NSLOG to printf in a global header file.

#define NSLog(FORMAT, ...) printf("%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);