Search code examples
ioscloudkitckasset

All CKAsset is available on all device?


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?

enter image description here


Solution

  • 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