1

I am designing an ios app which collects the user data and saves the data into a .txt file. I am currently using the sandbox in organizer in xcode to download these files. However, I want the users who do not have xcode to access these files as well.

So are there any ways that I can download these files either via USB, or via FTP to a server, or via iCloud, or via Bluetooth, or via WIFI?

2 Answers2

3

iTunes File Sharing would probably be the easiest method of getting files out of your app. You basically just add the UIFileSharingEnabled key to your app's Info.plist, then save the file to the sandbox's ~/Documents/ directory.

Here's a tutorial if you want a more in-depth discussion of how to use file sharing.

Austin
  • 5,625
  • 1
  • 29
  • 43
  • If the files are not that big, sending them via email would be nice too. Since it doesn't requires itunes. – Gonzo May 22 '14 at 17:52
  • Thanks for you comment. The files are small but there are more than 50 files generated per hour. I won't use the email unless there is an easy way to compress them. @Gonzo – user3593888 May 23 '14 at 15:34
  • The UIFileSharingEnabled works well. By using the iTune, I can download the file. Is there any way to delete the files? @Austin – user3593888 May 23 '14 at 15:50
  • Not from iTunes, and there isn't any way to notify the app that the files were downloaded. You'd have to use `NSFileManager` as with any other file. – Austin May 23 '14 at 17:54
0

Probably most easiest way is to dump file content to UIPasteboard.

bigblackdot
  • 138
  • 1
  • 9