ckasset

Saving an Asset List (array) to specific CKRecord

本秂侑毒 提交于 2019-12-22 17:04:08
问题 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 store some images and then fill the property and then trying to save it to CloudKit, but it's not working. Code goes as it follows: var images_array = [CKAsset]() // append the an image to the array images_array.append(CKAsset(fileURL: writeImage

How to store big image in CloudKit?

て烟熏妆下的殇ゞ 提交于 2019-12-22 07:00:57
问题 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 <CKRecordID: 0x15998770; 04359DFA-8370-4000-9F53-5694FC53FA9C:(_defaultZone:__defaultOwner__)> to server: record too large id=04359DFA-8370-4000-9F53-5694FC53FA9C of type UserSetting What is the maximum size of data is able to store in CloudKit ? How do you store big images taken with camera in CloudKit ? I tried with two image, and

Storing images in CloudKit as CKAsset, image upside-down

廉价感情. 提交于 2019-12-14 01:28:47
问题 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 being stored either totally upside-down, or 90º to the left or to the right. Here is an example of an image that was stored improperly: I took that picture with my iPhone 5s, in portrait orientation (I didn't save the original image to my device, as I

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

房东的猫 提交于 2019-12-12 12:19:10
问题 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 returns me useful information for conflict resolution, including the CKRecord I tried to save, and the current server version of the record. The first is in error.userInfo[CKRecordChangedErrorClientRecordKey] the second is in error.userInfo

How to store big image in CloudKit?

感情迁移 提交于 2019-12-05 09:17:53
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 <CKRecordID: 0x15998770; 04359DFA-8370-4000-9F53-5694FC53FA9C:(_defaultZone:__defaultOwner__)> to server: record too large id=04359DFA-8370-4000-9F53-5694FC53FA9C of type UserSetting What is the maximum size of data is able to store in CloudKit ? How do you store big images taken with camera in CloudKit ? I tried with two image, and I plotting out size of them. let d = UIImagePNGRepresentation(image) println("d.length: \(d.length)") d