I am working on an app that backs up a user's photo library to a flash drive. The issue I am running into is with photos that are stored in iCloud.
When the user has the 'Optimize Storage' option enabled, there can be thousands of photos stored in iCloud. When using requestImageForAsset or requestImageDataForAsset, if the photo is not stored on the phone, it gets downloaded back the user's photo library. This means thousands of photos, which can be several GB of data, are being loaded back onto the users device. For some users who are low on storage, it is causing the app to not function correctly.
Is there any way to download a full resolution PHAsset that is stored in the iCloud without it being copied to the Photos app?
Related
I get all kinds of EXIF data (like location and camera model) easily from images, and I'm trying to replicate this for my .MOV movie files pulled from my iPhone.
I know Apple has this information somewhere because you can see the location in the Photos app, but I don't know how to programmatically access this when looking at .MOV files directly.
In order of preference for my use-case (Python-based personal photo organizer / enrichment):
Is this available ideally somewhere in the file (or another file) itself
Stored somewhere in iCloud that is queryable / scrapeable
Available when building an iOS application (thinking I could build a sync-type app)
To get created date and other properties of MOV files so far, I'm using hachoir based on this StackOverflow answer:
Getting metadata for MOV video
I have an app that allows a user to either take photo or point to a photo on from their camera roll. This record must be peristed locally. A record consists of text and an image. Savings this data on a single device seems simple, as I can persist the link to the image or store the image locally in the file system if taken via camera.
Problem is how to share this record via iCloud to make record available to all instances of the app on multiple devices. I.e iPhone creates a record with an image, which is then available to view on iPad or Apple TV.
Is it efficient to store a UIImage in a Core Data record and make this available via iCloud? Many people saying not for local storage
My concern is this could potentially be some large quantities of data?
Does anyone have any thoughts on how to solve this issue?
I´m working on a similar app, for me working with http://Parse.com is a solution.
If your user have an internet connection and can wait to upload the images/text files you can save it directly using Parse (with a fancy progress Bar!) But if you want to make it network-less proof, you might work as whatsapp. I mean using Core Data to save your files locally, then try to upload the imagens whenever there is internet available.
There are some others clouds DB you can use, but I´m familiar with this one.
You can upload to iCloud using NSFileManager.
There is a complete walkthrough on how to do that.
I am working on a site that allows users to upload photos from their iPad. This works well, but the photos are not stored locally on the iPad in the Photos application. Is there a way for photos made directly from Safari to be stored there or is this not possible?
I want to design an app which stores documents on iCloud. But there are some question which has answer before doing actual implementation.
The question are as follows,
What is maximum file size to upload on iCloud?
Can I programmatically calculate/know the available space on user's
iCloud account?
How can I get the event for uploading and Downloading files from
iCloud?
Can anyone please help me here ? I read the apple documentation but not understood all the things completely.
Thanks In Advance.
Although you mentioned you've read the apple icloud documentation, the designing for icloud documentation page from Apple is still a good starting point for this question.
File Size Limits
The documentation doesn't specify a Document file size limit, nor a Core Data storage limit, other than a user account icloud storage allowance. There is a limit for Key Value storage which is 1Mb for a value (in a value-key pair), which could be an issue for you, but otherwise it seems you can store large files as long as the user has enough space available.
Given the 5gb default amount and accounting for the default user storage needs (photos, contacts, calendars and the like), you may encounter limits for Document and Core Data storage, like any other app. The file management for icloud page mentions good app behaviour:
Apps that take advantage of iCloud storage features should act
responsibly when storing data in there. The space available in each
user’s account is limited and is shared by all apps. In addition,
users can see how much space is consumed by a given app and choose to
delete documents and data associated with your app. For these reasons,
it is in your app’s interest to be responsible about what files you
store.
Check Available Space Programmatically
No
Upload/Download Events
The file uploading and downloading is handled by the OS. All files are stored locally, it's from this local store that you request/modify/save documents. From the icloud fundamentals page:
When you adopt iCloud, the operating system initiates and manages
uploading and downloading of data for the devices attached to an
iCloud account. Your app does not directly communicate with iCloud
servers and, in most cases, does not invoke upload or download of
data.
See this app coda tutorial for an example of key-value store integration, this Tim Roadley tutorial for Core Data store integration or this Ray Wenderlich tutorial for Document store integration.
Edit: The Document-Based App Programming Guide for iOS provides code snippets for moving files to/from iCloud, uploading and downloading as well as monitoring file changes. See "Downloading Document Files from iCloud" and "Moving a Document to iCloud Storage".
I have an application that will take care of recording video using UIImagePickerController object and videos are saved in the shared library of IOS.
I have only one problem.
If you record video from an external application to my application, unfortunately I can see both the videos recorded with my application is the video recorded by the other application.
Is there a way to make the filter of assets not recorded with my application?
Thank you,
Vincenzo
Save video to apps document folder and while using, pick it from the same location.
Refer this link to save video in documents folder.
But your other apps are unable to access those and deleting app deletes captured videos too.