jjzjj

Cloudkit

全部标签

ios - CloudKit:CKFetchRecordChangesOperation、CKServerChangeToken 和 Delta 下载

我的问题与WWDC2014AdvancedCloudKit中命名的“DeltaDownload”有关。我正在尝试为我的CoreData应用程序进行同步,该应用程序目前仅适用于iPhone(想想:只有一台设备处于事件状态)。因此,基本上,对于目前的大多数情况,该应用程序将从同一台设备将用户记录存储在云中。我无法理解基于CKFetchRecordChangesOperation又名Delta下载的自定义区域功能。正如我所说的那样,我们有CKServerChangeToken来维护同步操作(我的意思是只下载那些被另一台设备添加/修改/删除的记录),正如WWDC上所展示的那样。但是,我无法理解

ios - 我可以从 CloudKit 接收与 CKQuery 对应的记录数吗?

我尝试为此使用CKQueryOperation:CKQueryOperation*o=[[CKQueryOperationalloc]initWithQuery:query];[osetDesiredKeys:@[]];但它仍然返回了很多我此时不需要的数据{creatorUserRecordID->lastModifiedUserRecordID->creationDate->2014-10-3107:20:45+0000modificationDate->2014-10-3107:20:45+0000modifiedByDevice->iPhoneSimulator}我只需要记录数。

ios - CloudKit - NSPredicate 用于在引用列表中查找包含指定 CKReference 的所有记录

我正在开发一个CloudKit支持的应用程序,该应用程序的用户记录类型具有“以下”引用列表属性。我正在尝试构建一个查询以获取关注指定用户的每个用户(即指定用户显示为以下引用列表中的条目的那些用户)。我目前正在尝试为CKQuery构造我的NSPredicate:NSPredicate*predicate=[NSPredicatepredicateWithFormat:@"%@INfollowing",[[CKReferencealloc]initWithRecordID:currentUserIDaction:CKReferenceActionNone]];CKQuery*query=[

ios - 在没有 iCloud 帐户的情况下使用带有 CloudKit JS 的 android 设备

在观看WWDC2015CloudKitJS时,我意识到Android设备用户可能需要iCloud才能从CloudKitDB请求数据,因为苹果用户需要打开iCloud帐户。我的假设正确吗?有没有办法让我的应用程序跨平台? 最佳答案 没有什么能阻止您在Android上使用CloudKit。事实上,示例代码位于https://cdn.apple-cloudkit.com/cloudkit-catalog/明确指出CloudKitJS在嵌入式WebView上受支持,包括Chrome(在Android上)。如果您的应用程序需要身份验证,Clo

ios - 如果用户不打开 iCloud Drive,带有 CloudKit 的应用程序有哪些限制

如果用户不开启iCloudDrive,哪些CloudKit服务不可用?是否可以通过应用打开iCloudDrive?我想无论iCloudDrive是什么,从公共(public)容器下载记录应该都可以,只有在启用时才写入容器?! 最佳答案 这里是Apple暗示CloudKit需要iCloudDrive的地方:Improvetheuser’sexperiencebyverifyingthattheuserissignedintotheiriCloudaccountbeforesavingrecords.Iftheuserisnotsign

javascript - 无法加载资源 : the server responded with a status of 421 (Bad Request)

我正在使用Apple的新CloudKitJS引用和示例代码来构建一个简单的CRUD应用程序。在我什至可以到达CRUD之前,我被Apple身份验证阻止了。index.htmlSignin/**Initializetheglobalobjectswewillneed.*/if(typeofCKCatalog==='undefined'){CKCatalog={};}if(typeofCKCatalog.tabs==='undefined'){CKCatalog.tabs={'readme':[{}],'not-found':[{}]};}window.addEventListener('c

ios - 无法将 Realm 与 iCloud 同步

我正在尝试将我的应用程序中的Realm与iCloud/CloudKit同步,但没有成功...这是我的源代码:-(void)sync{NSURL*baseURL=[[NSFileManagerdefaultManager]URLForUbiquityContainerIdentifier:nil];if(baseURL)//iCloudisactive{NSURL*serverURL=[NSURLURLWithString:@"http://myMacBookNwtworkIP:9080"];//RealmObjectServerisupandrunningatthisURLRLMSyn

ios - CloudKit复合查询(OR查询)

我想使用OR和两个字段来查询CloudKit。但我找不到如何做到这一点的方法。我所做的是:NSPredicate*predicate1=[NSPredicatepredicateWithFormat:@"(creatorUserRecordID==%@)",userId];NSPredicate*predicate2=[NSPredicatepredicateWithFormat:@"(toUser==%@)",userId];NSCompoundPredicate*compPredicate=[NSCompoundPredicateorPredicateWithSubpredicat

ios - 如何在 CloudKit 中存储大图像?

我尝试将图片上传到CloudKit,并将其存储为NSData,但是使用相机拍摄的相对较大的图片出现此错误:Errorsavingrecordtoserver:recordtoolargeid=04359DFA-8370-4000-9F53-5694FC53FA9CoftypeUserSettingCloudKit中能够存储的最大数据量是多少?如何在CloudKit中存储用相机拍摄的大图像?我尝试使用两张图片,然后绘制出它们的大小。letd=UIImagePNGRepresentation(image)println("d.length:\(d.length)")d.length:554

ios - 如何在运行时确定 CloudKit 环境?

是否有一种编程方式来发现我的应用程序是在与CloudKit开发环境还是生产环境对话?(我知道我可以查看Entitlements.plist中的com.apple.developer.icloud-container-environment键来做出明智的猜测,但这并不能真正证明我正在使用的环境。) 最佳答案 截至目前,您可以在CKContainer上使用扩展。这对于调试和开发目的非常有帮助。extensionCKContainer{publicvarisProductionEnvironment:Bool{letcontainerID