Search code examples
iosobjective-cxcodeloggingnslog

Why are NSLogs in Xcode 8 cut off?


I just installed Xcode 8 and I use NSLogs to see my server response and for other verifications.
However, my NSLogs with my server response (in JSON) are getting cut off.

Any Ideas?
I am using objective-c and running my app on a real device.


Solution

  • I was able to figure this out with the help of This question

    You have to create a global header (YourProjectName.pch) Then post this line:

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

    Then you can call NSLog like normal from any view like NSLog(@"My array data: %@", anArray);