Output of NSLog for applications running without XCode?
I'm distributing my first Mac OS X application to beta-testers and i have a silly question but have trouble finding the answer :
"Where is the 开发者_C百科output of NSLog calls once your application is packaged into a .app bundle ?"
Henry,
Asked and answered: Here
Basically, stdout/stderr go to the console log, visible with the Console.app.
There is not so elegant but quite user-friendly method. It is an Organizer. Yes, I know, it is a part of Xcode. You can blame me for the fact that my answer is supposed to reveal some xcodeless method but you can use the method described below even if you have no source code. It could be useful in some cases.
So, here is the method:
- Open Xcode.
- Select
Window -> Organizer
menu item. - Select your plugged iDevice there.
- On your iDevice check that
Settings -> Developer -> Logging
switch control is on. - Launch the app.
- In Organizer select
Device Logs
tab. There are all the logs of your device to the moment.
If there are no logs at Device Logs
tab check #4, then reconnect the device. In some case you should then restart Xcode.
精彩评论