cloudkit

How can CloudKit environment be determined at runtime?

大城市里の小女人 提交于 2020-07-05 03:54:10
问题 Is there a programmatic way to discover whether my app is talking to the CloudKit Development or Production environment? (I know I can look at the com.apple.developer.icloud-container-environment key in Entitlements.plist to make an intelligent guess, but that doesn't really -prove- which environment I'm using.) 回答1: As of now you can use an extension on CKContainer . This can be very helpful for debugging and development purposes. extension CKContainer { public var isProductionEnvironment

Issue with optional Core Data relationship using NSPersistentCloudKitContainer

拥有回忆 提交于 2020-06-26 12:23:48
问题 I am using NSPersistentCloudKitContainer, not sure if that's the cause of my issue or CloudKit generic behaviour. The sync setup works fine so far. I am now adding a new feature, causing some an issue: I have an entity Item, which can be put in a Group. Relation in CD is to-one and optional. Works fine on device: I can set and remove group, everything is persisted. But CloudKit just ignores when I remove the group. It does not complain, just ignores it. No matter if remove happens from Item,

NSPersistentStoreRemoteChangeNotification not getting fired

会有一股神秘感。 提交于 2020-06-25 20:19:39
问题 I am trying to perform history tracking in my CoreData+CloudKit project which uses NSPersistentCloudKitContainer . I have been following along with Apple's sample project I want to perform certain task when the remote store has been updated. For this apple recommends enabling remote notification in the Signing & capabilities's Background Mode section of the app. I have enabled History Tracking for my project as shown in Apple's sample project. // turn on persistent history tracking let

NSPersistentStoreRemoteChangeNotification not getting fired

我只是一个虾纸丫 提交于 2020-06-25 20:18:29
问题 I am trying to perform history tracking in my CoreData+CloudKit project which uses NSPersistentCloudKitContainer . I have been following along with Apple's sample project I want to perform certain task when the remote store has been updated. For this apple recommends enabling remote notification in the Signing & capabilities's Background Mode section of the app. I have enabled History Tracking for my project as shown in Apple's sample project. // turn on persistent history tracking let

Relationship persistence with NSPersistentCloudKitContainer

こ雲淡風輕ζ 提交于 2020-06-24 10:08:50
问题 I'm working on an app that uses NSPersistentCloudKitContainer to share data between devices. The core data model has multiple entities, two of which are connected using a relationship with it's respective inverse. The issue I'm having is that when I set the relationship to nil the cloud data is not updated and when I restart the app, the relationship gets reset back what it was before it was set to nil . Is this a bug in the new NSPersistentCloudKitContainer ? Is anyone else having this issue

Relationship persistence with NSPersistentCloudKitContainer

点点圈 提交于 2020-06-24 10:07:07
问题 I'm working on an app that uses NSPersistentCloudKitContainer to share data between devices. The core data model has multiple entities, two of which are connected using a relationship with it's respective inverse. The issue I'm having is that when I set the relationship to nil the cloud data is not updated and when I restart the app, the relationship gets reset back what it was before it was set to nil . Is this a bug in the new NSPersistentCloudKitContainer ? Is anyone else having this issue

Xcode successfully builds but fails to run macOS app

半腔热情 提交于 2020-05-29 06:56:34
问题 I've written a mac application that uses CloudKit, and ever since I've upgraded to Sierra and XCode 8, the app will successfully build, but Xcode will not launch the application when I click "run". If I go into the Derived Data folder and manually double-click my application to launch it, it crashes immediately and displays the following in the error report: Time Awake Since Boot: 12000 seconds Time Since Wake: 6500 seconds System Integrity Protection: enabled Crashed Thread: 0 Exception Type

EXC_BAD_INSTRUCTION from com.apple.xpc.activity.com.apple.cloudkit.scheduler.com.apple.coredata.cloudkit.activity.export

久未见 提交于 2020-05-25 06:25:32
问题 I have an app that runs fine on iOS, but when running with catalyst, it gives me this crash intermittently if I swipe to another virtual Desktop on macOS, and then back, for about 10 times. It mostly happens on a UICollectionViewController This is the backtrace: (lldb) bt * thread #5, queue = 'com.apple.xpc.activity.com.apple.cloudkit.scheduler.com.apple.coredata.cloudkit.activity.export', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x00007fff68c373ae

Why is CKModifyRecordsOperation to batch delete records in CloudKit not deleting records?

若如初见. 提交于 2020-05-15 09:25:35
问题 I have code to batch delete records from the private database in CloudKit, but it's not working. (I also noticed that the records I saved are not remaining.) I am using an actual iPhone 8 with an actual Apple ID I personally use, not a developer account. I get the same results with an iPhone 8 Simulator. I don't have this problem when I log in to iCloud with the same Apple ID as my developer account using iPhone 8 Simulator. After answers to this post have not given me a solution, I think the

CloudKit: Fetch all records with a certain record type?

你。 提交于 2020-05-09 22:52:41
问题 I have currently got CloudKit set up in my app so that I am adding a new record using the help of the following code below, CKRecordID *recordID = [[CKRecordID alloc] initWithRecordName:@"stringArray"]; CKRecord *record = [[CKRecord alloc] initWithRecordType:@"Strings" recordID:recordID]; [record setObject:[NSArray arrayWithObjects:@"one", @"two", @"three", @"four", nil] forKey:@"stringArray"]; [_privateDatabase saveRecord:record completionHandler:nil]; However, now I would like to be able to