When I save up a CKAsset
to server, will it be available on all device? What if on a certain device I do not need one of the asset? Will it take space there too?
Asked
Active
Viewed 150 times
1 Answers
5
That depends. The CKAsset will only be available on a device if it reads the corresponding CKRecord. If it does not read the CKRecord, then you would also not have the CKAsset.
Besides that you can not be 100% sure that once you have read a CKAsset that it also would be at Caches/CloudKit/Assets. That is only a cache. I'm not sure what the logic is for cleaning it up, but it can be cleaned up

Edwin Vermeer
- 13,017
- 2
- 34
- 58
-
When will asset be available? At completion of reading CKRecord will asset be available, or I have to wait a certain amount of time? file could be big, this is my concern. doc says only `After fetching a record containing an asset, you can retrieve the asset data with the URL in the fileURL property.` – János Apr 26 '15 at 13:31
-
1In all tests I have don with CKAsset it was available the same moment the CKRecord was read. I have not seen anything in the documentation that would suggest otherwise. – Edwin Vermeer Apr 26 '15 at 16:22