In Xcode, would it be possible to create a method that generates a run log for the application and save it in a .log or .txt file? I plan to have the user able to read and email the file.
Asked
Active
Viewed 297 times
0
-
What would you like to have in your run log? If you are creating it on your own, you can save it to the Documents directory and then create an interface to load the file from there. I think it's also possible to send this file to another app. – James Lim Sep 05 '11 at 04:00
-
To log to a file see http://stackoverflow.com/questions/7271528/nslog-into-file/7307150#7307150 To email an attachment see http://stackoverflow.com/questions/6224937/attachment-of-file-in-compose-mail-in-iphone/6225012#6225012 – Jano Sep 05 '11 at 11:56
1 Answers
0
You can create your own function that outputs data to a file. For example, I have created my own "logging" feature that outputs NSLog's to a file. Although it's not accessible to the user from within the app, I do have an "email logs" feature that the user can send me the logs from within the app.

WrightsCS
- 50,551
- 22
- 134
- 186