Reputation: 1015
I have an external accessory plugged in my iPad. I cannot see my NSLog statements because my ipad can no longer be connected to my computer. Is there a way to still see the NSLog statements?
Upvotes: 1
Views: 425
Reputation: 7226
Yes, you can redirect your NSLog statements to a file for later display. See Logging to a file on the iPhone.
This will cause log statements to be written to a named file. If you're wondering how it works, look up how C text input/output works, with stdin, stdout and stderr.
freopen([newFileName UTF8String], "w+", stderr);
You could just save that file to your Documents directory, and retrieve it through iTunes File Sharing. Or, you can have the app dump its log contents to the console once your device is plugged back in. Remember to disable that redirection first.
Upvotes: 3
Reputation: 1439
Do you have access to source code? If yes, then you can add some UITextView or UILabelView over all UIViews, and put all your NSLog statements there.
Upvotes: 1