Save log files and transfer to PC
https://stackoverflow.com/questions/2542853
Solution
You can write to log files in ../Documents (one directory up from the .app where the executable resides - I'm pretty sure this is the default working directory). Once you've saved them there, you can go in XCode to Window > Organizer. In there, select your iPhone/iPod, under Applications expand your app's name, and it should show "Application Data" - just click the little down arrow on the right side to download your app's data.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow