本文介绍了creatorUserRecordID.recordName包含“__ defaultOwner __”"而不是仪表板中显示的UUID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CloudKit 下载 CKRecord 并在绘制创建者 recordName ,我可以看到:

Downloading a CKRecord from CloudKit and when plotting creator recordName, I can see this:

(lldb) po record.creatorUserRecordID.recordName
__defaultOwner__

但是,仪表板显示实际值。

but, Dashboard show a real value.

为什么会有差异?!

我希望我不必仅因为登录用户而下载?!

I hope I do not have to download only because of this the logged in user first?!

推荐答案

__ defaultOwner__表示其当前登录的iCloud帐户所拥有。因此,如果您拥有Me或该人的姓名,您可以将其替换。如果要查找登录用户的recordID,可以使用异步方法fetchUserRecordIDWithCompletionHandler。

"__defaultOwner__" mean's its owned by the currently logged in iCloud account. So you could replace that with "Me" or the person's name if you have it. If you want to find out the logged in user's recordID you can use the asynchronous method fetchUserRecordIDWithCompletionHandler.

这篇关于creatorUserRecordID.recordName包含“__ defaultOwner __”"而不是仪表板中显示的UUID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 15:31