cloudkit

CKSubscription of type CKSubscriptionOptionsFiresOnRecordUpdate doesn't work

岁酱吖の 提交于 2019-12-11 03:37:19
问题 I setup a CKSubscription with the following code: NSPredicate *predicate = [NSPredicate predicateWithFormat:@"TRUEPREDICATE"]; CKSubscription *subscription = [[CKSubscription alloc] initWithRecordType:@"RecordTypeName" predicate:predicate subscriptionID:@"Subscription1" options:CKSubscriptionOptionsFiresOnRecordCreation | CKSubscriptionOptionsFiresOnRecordUpdate]; CKDatabase *privateDatabase = [[CKContainer defaultContainer] privateCloudDatabase]; [privateDatabase saveSubscription

Can't Get CloudKit to Authenticate (Using Javascript and a Server-to-Server Key)

只谈情不闲聊 提交于 2019-12-11 03:08:38
问题 I'm trying to use Apple's cloudkit.js file to make a server-to-server connection to CloudKit. However, despite messing with the config for several hours, I can't seem to get CloudKit to consider my request valid. My config logic is pretty straightforward: const privateKeyFile = `${__dirname}/eckey.pem`; const keyID = '*some key ID*'; const config = { containers: [ { containerIdentifier: 'iCloud.com.*someNameSpace.someProject*', environment: 'development', serverToServerKeyAuth: { keyID,

NSPredicate matching string for Cloudkit

混江龙づ霸主 提交于 2019-12-11 00:06:00
问题 I need to pull the record from cloudkit matching a string. I have a User record type, with an email field. I have multiple records with the same email, but I can't get the predicate to get me the records. I've tried all of these: let predicate = NSPredicate(format: "email = 'julio_ukohgsp_chevez@tfbnw.net'") NSPredicate(format: "email == %@", argumentArray: [email]) NSPredicate(format: "email IN %@", [email]) NSPredicate(format: "email contains %@", email) NSPredicate(format: "email = %@",

CKFetchRecordsOperation + CKQueryOperations … what am I missing?

女生的网名这么多〃 提交于 2019-12-10 22:39:49
问题 Managed to cobble together a CKFetchRecordsOperation after much searching for sample code; and here it is... but I must have missed something. Don't get me wrong it works a treat... but... To execute a CKFetchRecordsOperation you need an NSArray of CKRecordIDs; to get a NSArray of CKRecordIDs, you need to execute CKQuery thru which you can build your NSArray of CKRecordIDs. But wait a minute, the process of extracting the CKRecordIDs uses a CKQuery, thru which I could simply download the

Any working sample code for CKDiscoverAllContactsOperation for IOS8 beta CloudKit?

那年仲夏 提交于 2019-12-10 18:01:16
问题 I have been playing with icloud in the ios 8 beta, and the CloudKitAtlasAnIntroductiontoCloudKit sample project has been very helpful. https://developer.apple.com/library/prerelease/ios/samplecode/CloudAtlas/Introduction/Intro.html But I wanted to use the CKDiscoverAllContactsOperation class and I cannot find any sample code for it anywhere at all and the online documentation is not very helpful. https://developer.apple.com/library/prerelease/ios/documentation/CloudKit/Reference

CKDiscoverAllContactsOperation not fetching contacts

泄露秘密 提交于 2019-12-10 17:08:09
问题 I am using CKDiscoverAllContactsOperation but its not working fine for me. -(void)queryForAllUsers: (void (^)(NSArray *records))completionHandler { CKDiscoverAllContactsOperation *op = [[CKDiscoverAllContactsOperation alloc] init]; [op setUsesBackgroundSession:YES]; op.queuePriority = NSOperationQueuePriorityNormal; [op setDiscoverAllContactsCompletionBlock:^(NSArray *userInfos, NSError *error) { if (error) { NSLog(@"An error occured in %@: %@", NSStringFromSelector(_cmd), error); //abort();

CloudKit reindexing data takes forever

青春壹個敷衍的年華 提交于 2019-12-10 15:55:16
问题 I have a CloudKit-based app running in production, each user may have on average 1000 items in the main entity of the app. I just added an index to one of the entities in my schema, and after deploy, I get the "reindexing production data" progress in CloudKit Dashboard. That thing has been running for days and shows no sign of stopping. So I tried adding another index to the main entity in the development CloudKit environment, which has just my data (3000 records). Even this is taking a long

CKModifyRecordsOperation modifyRecordsCompletionBlock not being called

▼魔方 西西 提交于 2019-12-10 13:45:33
问题 I'm using CKModifyRecordsOperation to save a set of records and if I have internet connection all works well and completion block is being called. But when I don't have connection the completion block is not being called and I don't get any information that my operations failed. I'm using the following code in completion block modifyOperations.modifyRecordsCompletionBlock = ^(NSArray *savedRecords, NSArray *deletedRecordIDs, NSError *error) { if(error){ NSLog(@"Error: %@", error

Multiplatform MBaas similar to CloudKit?

我的梦境 提交于 2019-12-10 12:44:00
问题 I need to implement my CloudKit based app in Android too. Which MBaas has the most similar architecture like CloudKit? I need these features: cascade deletes able to track insert / update / delete changes in tables up from a date represented with a token asset management cursor based record fetching / paging, skip scalable (no join like operation need / should be possible) able to get push notification about changes reasonable pricing for startups cloud based no server side logic don't offer

How to query for Metadata in CloudKit JS?

巧了我就是萌 提交于 2019-12-10 11:51:06
问题 I've figured out how to query for some metadata for example calling this in my query: <td>" + record['created'].value + "</td> <-- populates some table data But this comes back undefined which confuses me because the CloudKit dashboard has a value for Created By (as part of the automatic Metadata that is created with each record.) How do I query for the ID/UUID as well as get the response in a HTML/JS-readable manner? 回答1: After fetching one or more records with CloudKit.js you'll notice you