tags:

views:

59

answers:

3

I have an external device w/ a USB port. The device periodically writes files to a USB flash drive in the USB port.

I would like to be able to plug an iPhone into the USB port and have the files written and stored on the iPhone instead of a USB flash drive. The intention is to have an iPhone app running when the phone is plugged into the USB port that would detect when files are written and would then process the files.

Is this possible? If so, any thoughts or references on info related to this area.

Thanks, Chris

A: 

By default you can read/write files to the same directory where the camera stores pictures. If you jailbreak the iphone, you could read/write to any directory.

EJB
A: 

You can only write files to your Sved Photos folder in the iPhone. If you want to save them in some other place you sould use some specific app to upload files from your computer through the network to your iPhone.

sicario
So if the external device just "blindly" writes to a USB flash drive now, can I write an iPhone app to "watch" for the external device writing and write the file to the photos folder? That is, keep the external device entirely "dumb" of the process on the iPhone.
ChrisP
Well technically, if you write something in the photos folder "as an image" any app could open it but "as an image" again and only though a sandboxed mechanism.Now, you cannot make a normal app to do that. An app can go into it's documents folder or into the photos folder. Solution: @EJB, jailbreak. (Not recommended by me).
sicario
These would be image files. Basically, I want to have the external device write the image files to the iPhone and then have an app that allows the user to view the photos. Is this possible w/ a standard app? FYI, I've been programming for a while but am brand new to iPhone development so bear w/ me.
ChrisP
Ok, i get it.You have this scenario:If your external device writes that images to your Photos Folder, you can only acces them using a UIImagePickerController, so you can't choose what image you want, the user does.You can't make your device to write any file in anywhere in your iPhone (legal ways). You can make your app connect to your PC or your Mac or some site to download the images to the Documents folder of your app.Nothing else.
sicario
A: 

No, you can't do what you want without jailbreaking your iPhone.

sicario