Downloading documents from Mac/PC to iOS device

Users on a PC or Mac create content using my PC or Mac apps to be displayed on the iOS app I’m building.

I see the network APIs for downloading and uploading content from web servers, but is there a way to directly read content from a PC or Mac that my iOS device is plugged into via USB, either from a folder on the desktop computer or even better, by opening some sort of session with my app running on the desktop?

-Tom [import]uid: 100708 topic_id: 20629 reply_id: 320629[/import]

Not at this time but I would encourage you to make a post in Feature Requests :slight_smile:

Peach [import]uid: 52491 topic_id: 20629 reply_id: 80998[/import]

I’m struggling with exactly this scenario too.
I have a few solutions, but nothing as neat as direct reading from within the app.
Corona apps cannot ‘interrogate’ a folder to see whats there.
You can guess a filename and check if it exists by trying to open it.

What you are asking for is a ‘pull’ method.
If you are interested, there is already a ‘push’ method.
If you include

UIFileSharingEnabled = true

in your build settings , then when the user plugs in the iPhone or iPad and synchs, they will be able to select your app in iTunes, and they will see the contents of the system.documents folder
(Right at the bottom of the screen… if you don’t have an enormous monitor you could be forgiven for never seeing this option)
So they can drag files in, and drag files out.
Its clumsy, and I would rather Apple had implemented this folder like a mounted drive on the desktop, but its better than nothing.

You can also ‘pull’ from a web site.
(My current gripe about that is that even if there is no file, I get a file created by trying to download one.
Its full of error 404 message: I would have expected a trappable network error 404, but I dont get that: presumably because the server is being ‘kind’ and delivering some content, even if it is no use to me.
) [import]uid: 108660 topic_id: 20629 reply_id: 81011[/import]