Which folder should I use to save user's photo taken by app - ios

I'm developing photo app but my app has rejected twice because of iOS Data Storage Guideline.
I don't know an exact folder which saving user's contents (In this case, user's photo taken by my app).
I guess '/Documents' could be answer, but I have no confidence.

You can save the images inside the apps document folder or can save the paths to images .

You can create you own sub directory of document i.e Documents/Photos. You can check they are saving to the correct place by enabling iTunes to access the documents folder and checking that they are being written to the correct place.

Related

How to copy photo in device's photo gallery to local path

I have found lots of answers regarding how to download and save online photos to the app's cache or temporary directory. However, I need to know how to copy an image from the device's local gallery to the app's cache.
The reason for this is a strange problem with iOS, where attempting to upload images to Firebase, using paths of images in the gallery, always fails in a physical device and always works in iOS simulator and Android (both physical and simulated). In the app I am building I also have the ability to take photos, which are saved to the app's directories by the camera app, and those uploads work fine. I need to try and first copy the images to my cache, to test if it will allow me to upload them to firebase successfully. I am using multi_image_picker to get the local paths of the selected images from the gallery, all I need is to know, once I have those paths, how to copy a single one of those files to my app's temp directory (I use path_provider to get the appropriate path to temp directory).
It probably isn't a permissions issue because I have both Camera and Photo Library permissions in my plist.info, I get prompted for access and I can access the gallery without a problem when using the multi picker.
I have tried looking at the camera plugin's files and figure out how it does it, but no luck, I get lost once the plugin calls native methods.
I appreciate any help.

How to pick(picker view) any files from ios device using objective c?

I was developing an ios application for file backup. In that I need to list and enable user to pick up files from any folder and need to do email backup like media and image picker.
I am struckup here with a bottle neck. I can't triger populating the list of document and email list for the user to pick. I had tried many codes, but it is not working.
I was working with the simulator.
Could anyone share their insight?
Regards
You should be more precise : do you want to pick up any file from any application on your device or just in your application library folder ? You can't access others applications folders.
You can find more information about the file system here :
https://developer.apple.com/library/mac/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html
iPhone do not have a file browser.
The only place that a iPhone app can take file is from photo album.
Every application keeps its files in its private place.

Which is permanent storage directory in iOS?

I need to store permanently (as far as app is not uninstalled from the device), the photos that are taken from camera roll and photo library into my app's bundle. Perviously i was storing those file in tmp folder, i read that the contents of tmp folder will be purged by iOS if it finds less memory for other app to run.. so my images were not getting displayed in my app after 3 or 4 days as IOS would have purged the content of tmp folder.
SO where do i need to Store these files? In Documents folder? is documents folder is permanent ?people say that you should not store huge amount of files in documents folder.. There is no limit for the photos that can be taken from my app. user may take 100 photos, 200photos, 500photos, or more than that.. its ok if user uninstall the application.. i will download all those photos in background once he login again. so what would you suggest for this problem? any kind of help is highly appreciated.
thanks
You put the files in the Documents folder, or if you can download them again from Internet, in the cache folder. If in Documents folder, you must mark the files with the attribute that prevents them from getting backed up to iCloud, or your app will be rejected.
Do that using this documentation:
https://developer.apple.com/library/ios/qa/qa1719/_index.html
These rules are enforced pretty vigorously by Apple and spelled out in:
https://developer.apple.com/icloud/documentation/data-storage/
(Requires iOS app developer login to view, I believe.)
What you are looking for here is SQLite. Using SQLite you can store your data and Images.
For storing the Images you can refer this link

Storing & Reading documents present in iCloud

i want to develop an iPad app where i can store a list of PDF files/ iWork files in iCloud.
Finally any user who is using this app can able to download & read(only read no write) these documents inside my App.
Also i want to enable the autosync functionality in my app .So user can see updated document always.
Is this Possible ? What is the right way to achieve this functionality ?

Where to Store purchased very huge files >200MB on iOS?

Where i have to store downloaded huge files on iOS?
the file is more then 200MB.
Is < Application_Home >/Library/Caches the right directory for it?
The file is downloaded after in app purchase and should remain in the App.
After iCloud is implemented in Apple, The Document directory data is somehow related with iCloud Storage. Hence Apple is now rejecting the applications using heavy data storage in document directory.
You need to store the data at some other location. Store the PDF & Other Artwork file At some other location.
This link May Help You.
https://developer.apple.com/icloud/documentation/data-storage/
I Hope this helps.

Resources