iPhone: Saving picture/data to "public" folder? - iphone

I want to implement a backup feature in the app I'm working on, that simply puts an image and some data in a folder that can be accessed through itunes or similar.
But is this possible, and what can be done?
Point of the feature is that if (for some reason) the image and data isn't sent to my server, the user will have the ability to extract it to a pc/mac, so that the image and data isn't lost.
Any help is appreciated.

Enabled iTunes file sharing in your app's settings and then write your file to the Documents folder in your app. This will then allow them to see the file through iTunes.

Related

save profile image inside app using the built in camera

I have an app that contains a profile of the user.
In the profile editing, he has an option to take a photo of himself, then that photo should be saved in his details and be presented in certain places in the app.
Is there a way to internally save an image (not in his phone's photo gallery, but inside the app itself, so he cannot delete the photo through the phone), and then fetch that image every time I need it?
I understand I cannot use CoreData to save images, so I am wondering if there is an easier way to get it done efficiently.
Or must I do that in a server?
not in his phone's photo gallery, but inside the app itself
You can't store anything at runtime "inside the app itself". But the app has a sandbox, a folder area belonging to you alone, where you can store any file you like — in the Documents folder or the Application Support folder, for example. So why not just use that?

where to store 100s of images in iPad photo app

i am working on a iPad photo app, where i have to download 100s of images from web and have to store in app locally so that i can access it even if there are no internet connection. So for now i have store it to App's document directory . Is it be ok to store 100s of images in App's Document directory or is there any other way to store it. Please have a reply on it.
Yes you can store it in Document directory.
And also consider its size, if these are big files you can go for zip and save.

Importing photos saved in ios device's Documents folder to desktop

I'm creating a catalog/collection ios4 application. One element of the app lets the user take a picture which they use for a new item entry. The image they choose is then saved to their app's local Document folder.
I was wondering if it's possible to give the user the ability to import the photos to their desktop when they plug in their ios device. Like how iPhoto lets you import photos from your camera roll when you plug in your device
I've looked around, and all i can seem to find are posts on saving to the documents folder, and then retrieving the data within the app.
Any help would be great.
Thanks Ian
You could use an intermediate web service to transfer the files. Upload them to your service from the device, download them to the desktop.
Apple locks this stuff down pretty tight, so that might be your best bet.

Browsing files within iphone application

I have problem to browse different types of file.
I know browse music file and Photo from iPhone but i want to browse all typs of file doc,zip,ppt,xls,pdf files within a application. like music and photo library.
Is there any way to browse all types of files?
Thanks you,
You can use NSFileManager to browse the files in your application's little sandbox, but you're gonna have to work out a way to get the files there first (download or whatever), provided you don't include them with the application. If you want to interact with the files then you're in another ball game.
What do you mean browse "all types of files"? Files on the device itself? If so, you can only access files within your application's sandbox. You can get a list of a directory using NSFileManager and then render the results into a UITableView.

Is there any way to save an image an default.png programmatically on the iphone?

I writing an app for the iphone and I would like to save an image from it as the default.png for the next invocation. Is this possible? It seems as if the sandbox doesn't allow you to overwrite anything in its local filesystem.
No, you can't. It used to be possible to make Default.png a symbolic link into your Documents folder, then to rewrite the location it pointed to, but functionality was removed in 3.0. You should file a bug with Apple explaining your needs.
No you cant, what you can do is save the image data to a file or using core data and then retrieve it for use.
So you can do something like
if(dataIsThere)
//use that data for image
else
use the default