简体   繁体   中英

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.

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);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM