Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
Hi all..

In my app i am writing some entries to log using NSLog()...
In simulator, it is printing in console...

I tried my app in device, ut when i viewed its Logs (in Xocde) my application is writing nothing to it... Why??? (NSLog is not the one i want to use?)

Also.. how i can view the Logs normally if i am not having Xcode ...
In want my app to write some info to LOG, and user should be able to send me on request. Can user access the logs thru iTunes??

Anyway priority is how to make entries into Logs from my apps..
Why NSLog not writing anything in device's log??
 

mccannmarc

macrumors 6502
Aug 15, 2008
270
0
Manchester, UK
Hi all..

In my app i am writing some entries to log using NSLog()...
In simulator, it is printing in console...

I tried my app in device, ut when i viewed its Logs (in Xocde) my application is writing nothing to it... Why??? (NSLog is not the one i want to use?)

Also.. how i can view the Logs normally if i am not having Xcode ...
In want my app to write some info to LOG, and user should be able to send me on request. Can user access the logs thru iTunes??

Anyway priority is how to make entries into Logs from my apps..
Why NSLog not writing anything in device's log??


If you keep your device connected to your mac whilst it is running the NSLog()'s will be shown in the debugger console just like when you run it in the simulator.

If you want to save logs that the user can send you then you will have to create your own logging function that saves to a log file in the applications document directory. You could then have a button somewhere in your app that allows the user to send that log to your server or as an attachment in an email etc etc.
 

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
If you keep your device connected to your mac whilst it is running the NSLog()'s will be shown in the debugger console just like when you run it in the simulator.

If you want to save logs that the user can send you then you will have to create your own logging function that saves to a log file in the applications document directory. You could then have a button somewhere in your app that allows the user to send that log to your server or as an attachment in an email etc etc.

Thanking you for quick reply...
So u answered me the way i want to implement...

But why my entries are not visible in Device's console (eventhough i tried app aftr disconnecting frm Mac.)

But i played a game in device, and i can see the logs for that... (in Xcode, can i see it with iTunes?)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.