CKAsset URL

Originator:matthijs.logemann
Number:rdar://46626272 Date Originated:12-11-2018
Status:Open Resolved:
Product:iOS Product Version:N/A
Classification: Reproducible:Always
 
Currently when one uses a CKAsset using the CloudKit api on iOS, it gets downloaded when the record is queried. I believe this is not always what you want. For our app (fully reliant on CloudKit for remote database), we are storing images in the CloudKit database as CKAssets. When the app starts we query the data and create a local database using Core Data, where we store the data locally so we don't have to query CloudKit every time. Problem is that if we load all the data from CloudKit, also the images get loaded but that is not necessarily what we want. When a user opens the app and all images get loaded over mobile data, the user is presented by huge data usage.

My suggestion would be to have the option to not download the CKAsset data but rather have an URL (like CloudKitJS returns) which you can use later when you actually need the data. This makes it much better with regards to unintended data usage for the user and for the developers it adds a bit of flexibility to when assets are loaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!