在不获取的情况下在CKRecord变量中增加字段值

在不获取的情况下在CKRecord变量中增加字段值

本文介绍了在不获取的情况下在CKRecord变量中增加字段值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我很好奇是否有可能在不获取的情况下增加CKRecord变量中的字段值?因此,对于客户端,我对最近的值并不感到好奇,我只想增加任何值即可。原因是,操作应尽可能快速简便,而不是两个消息流,我只希望启动一个。

I am curious is it somehow possible to increment a field value in a CKRecord variable without fetching? So on client I am not curious about the recent value, I just want to increase whatever be the value is. The reason, operation should be as quick and easy as possible, instead of two message 'stream', I want initiate only one.

推荐答案

不幸的是你不能。您必须阅读,更改然后写记录。确保使用,然后将savePolicy保留为 CKRecordSaveIfServerRecordUnchanged 。如果出现错误,则可以尝试再次读写记录。

Unfortunately you can not. You have to read, change and then write the record. Make sure that you use the CKModifyRecordsOperation and leave the savePolicy to CKRecordSaveIfServerRecordUnchanged If you get an error then you could try read and write the record again.

这篇关于在不获取的情况下在CKRecord变量中增加字段值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 02:12