简体   繁体   中英

iPhone create csv file for export on computer

For testing purpose, I need to create logs in a CSV file in my iPhone application. I'm using Dave DeLong's CHCSVParser to create the CSV, but I don't know what path I should put when creating it to find it on my iPhone disk. I am using a FileBrowser app to go check the file straight from the device, but where to look at?

Also, I'm taking any advices for creating a CSV from the iPhone app and put it on a desktop computer, maybe you have other ways to do that...

Thanks!

Just put it in the Documents directory where you'd put anything else and enable document sharing while testing. Then you can get them straight from iTunes. You could also set up a simple web server that allows PUT and do HTTP PUT from your app. I'd probably do the second personally, especially just for testing.

To enable the file sharing, you need to add the UIFileSharingEnabled key to your Info.plist file and make sure it's set.

For more information on getting the Documents directory, please review the iOS Application Programming Guide , specifically the File System section, which you should have read by now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM