Questions tagged [ckasset]

CKAsset is a class of the CloudKit Framework

A CKAsset object represents a large file associated with a record. Use asset objects to incorporate external files—such as image, sound, video, text, and binary data files—into your app’s records.

Reference

39 questions
5
votes
3 answers

CKAsset in server record contains no fileURL, cannot even check for nil

I am testing a sync conflict when I save a record that contains a CKAsset (simply a JPG image) using CKModifyRecordsOperation with a save policy of .IfServerRecordUnchanged. I am getting the error CKErrorCode.ServerRecordChanged. This CKError…
Coder1224
  • 1,785
  • 2
  • 17
  • 21
5
votes
2 answers

Curious whether fileUrl of CKAsset can change with time?

I am caching CKRecord on client and fileUrl of CKAsset too. Can fileUrl change from time to time? Asset / data itself is not changing.
János
  • 32,867
  • 38
  • 193
  • 353
5
votes
1 answer

How to store big image in CloudKit?

I tried to upload a picture to CloudKit, and store it as NSData, but with a relatively bigger picture, taken with camera, I get this error: Error saving record
János
  • 32,867
  • 38
  • 193
  • 353
3
votes
1 answer

Using Cloudkit Assets as a UIimage

I have images saved in CloudKit as an asset. There are other attributes for each record as well. I can gather the record and use the other attributes, but I'm unable to use the asset in my ImageView. I'm new to Swift programming, therefore the error…
Dustin Johnson
  • 405
  • 1
  • 4
  • 5
3
votes
1 answer

Saving CKAsset from Core Data

I have some data like pictures, stored in Core Data as binary data and marked as "Allows External Storage". I'd like to write this data to the CloudKit. Is it possible to get URLs for this data and pass it to CKAsset, or transform somehow this data…
Alexey Chekanov
  • 1,047
  • 14
  • 25
3
votes
2 answers

CKasset File Size limit for CloudKit

Hi we want to upload large size video files to CloudKit. Are there any file size limit on CKAsset ? there is a link that mentions that the size limit is 15 mb but that cannot be correct since we tried uploading a 300MB video and it was successfully…
user3519594
  • 387
  • 1
  • 11
3
votes
1 answer

Storing images in CloudKit as CKAsset, image upside-down

I am working on developing an app that uses CloudKit to store and retrieve image files as CKAsset objects. Normally, this works great and I love CloudKit's small learning curve. Periodically though, I have this peculiar issue where an image is…
Pierce
  • 3,148
  • 16
  • 38
2
votes
2 answers

SwiftUI, CloudKit and Images

I'm really stumped by something I think that should be relatively easy, so i need a little bump in the right direction. I've searched in a lot of places and I get either the wrong information, or outdated information (a lot!). I am working with Core…
DeveloperSammy
  • 167
  • 1
  • 11
2
votes
2 answers

Saving an Asset List (array) to specific CKRecord

I've a CKRecord type created in the CloudKit backend with some properties related to that class. I've String properties, Bytes and I have a Asset List property, so store some images (multiple images related to a single record). Now I'm trying so…
Ivan Cantarino
  • 3,058
  • 4
  • 34
  • 73
2
votes
1 answer

Fetch CKAsset List Swift

I am using the code below to fetch a CKAsset List but it keeps crashing and telling me: "fatal error: unexpectedly found nil while unwrapping an Optional value" However the asset list is not empty in the CloudKit dashboard. Do you know where I am…
Tom Coomer
  • 6,227
  • 12
  • 45
  • 82
2
votes
2 answers

CloudKit - using CKAsset with package files

I am trying to store files in my app into CloudKit using CKAssets. Everything work fine, and uploads and downloads using CKRecord + CKAsset is working fine, except for some file types, including Numbers, Keynote and Pages documents. When I try to…
Z S
  • 7,039
  • 12
  • 53
  • 105
2
votes
1 answer

How to effectively use CloudKit daily transfer limit of of 25mb

I'm creating a highly picture oriented app that might end up using a lot of ckassets. But I read that there is a 25mb limit on daily data transfer per user. My question is is this data transferrable? If one user uses 0 then some other person can use…
shle2821
  • 1,856
  • 1
  • 19
  • 26
2
votes
1 answer

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?
János
  • 32,867
  • 38
  • 193
  • 353
1
vote
1 answer

Using CKAsset to store API JSON and Updating every 6 Hours

I'm building a native iOS app with Swift/Xcode that utilizes JOSN data from a 3rd party API. Everything is working fine but the API has restrictions on the number of calls you can make to the API each hour. So now I'm building a function intended to…
1
vote
1 answer

How can I store and retrieve audio files to and from CloudKit?

I am attempting to record voice messages and store them as CKAssets on CloudKit. I convert them into an AVAudioFile and save them to CloudKit as one of several properties on a Post record. var recordedMessage: AVAudioFile? var recordedMessageURL:…
Anthroman
  • 53
  • 7
1
2 3