cloudkit

How to update data in TableView without the delay using CloudKit when Creating new Records

ぐ巨炮叔叔 提交于 2019-11-28 01:14:01
There are 2 View Controllers in my App. The first "MainViewController" displays a tableView with CKRecords fields fetched from the private CloudKit database. Inside the viewWillAppear method of this VC I fetch records from CloudKit and reload data of a tableview to show the latest fetched results that have been previously saved in the CloudKit by the user. The second view controller "CreateRecordViewController" is made for creating CKRecords and saving them to the private database of the CloudKit. So i create records in the CreateRecordViewController and show them in the MainViewController.

iOS 9 CloudKit: query does not return anything while connected to cellular network

老子叫甜甜 提交于 2019-11-28 00:54:18
I'm developing an app with xcode 7 beta 5. When i run my app on my iphone 6 and i try to connect it to CloudKit if my iphone works in wifi mode all it's ok, i display all my data; but if my iphone works in LTE mode i can't see any kind of data. Does anyone know how to do this? func getRecordsFromCloud() { lavori = [] / let _cloudContainer = CKContainer.defaultContainer() let publicDatabase = CKContainer.defaultContainer().publicCloudDatabase / let predicate = NSPredicate(value: true) let query = CKQuery(recordType: "Lavori", predicate: predicate) / let queryOperation = CKQueryOperation(query:

Using Core Data, iCloud and CloudKit for syncing and backup and how it works together

北战南征 提交于 2019-11-27 16:45:46
I am in the early stages of creating an app where I would like to save, sync and backup data. The app will not store any files just data in a database. It is going to be iOS 8 and up so I am able to use CloudKit. I did some research and still not clear on how Core Data, iCloud and CloudKit work together. As far as understand CloudKit is just a way of getting and retrieving data to/from the cloud. Is CloudKit just a different way of syncing data with iCloud? My questions are: If I do use CloudKit, do I still need to create local core data database? If yes will it be automatically synced with

CloudKit Server-to-Server authentication

心已入冬 提交于 2019-11-27 09:52:57
问题 Apple published a new method to authenticate against CloudKit, server-to-server. https://developer.apple.com/library/content/documentation/DataManagement/Conceptual/CloudKitWebServicesReference/SettingUpWebServices.html#//apple_ref/doc/uid/TP40015240-CH24-SW6 I tried to authenticate against CloudKit and this method. At first I generated the key pair and gave the public key to CloudKit, no problem so far. I started to build the request header. According to the documentation it should look like

CKFetchNotificationChangesOperation sometimes does not return UPDATE, DELETE notifications

烂漫一生 提交于 2019-11-27 07:44:10
问题 CKFetchNotificationChangesOperation returns INSERT operations, but UPDATE and DELETE, not always. DELETE, UPDATE worked last when I submitted app to App Store, but now not anymore. Why? I have created subscriptions like: let s = CKSubscription(recordType: recordType, predicate: NSPredicate(value: true), options: .FiresOnRecordCreation | .FiresOnRecordUpdate | .FiresOnRecordDeletion) s.notificationInfo = CKNotificationInfo() subscriptionsToSave.append(s) Dashboard shows all tree triggers: I do

CloudKit push notifications on record update stopped working

烂漫一生 提交于 2019-11-27 06:55:52
问题 EDIT : Retested today 27.08.2015 and it works again, Apple has fixed it. I have an application in development mode. The application uses CKSubscription to get notified on changes on the server, configured for all three options: create, update, delete. Everything was working fine but recently during regression tests I have discovered the application does not receive notifications on record updates, the create and delete notifications are still working. The susbcription types are set correctly

Using Core Data, iCloud and CloudKit for syncing and backup and how it works together

落花浮王杯 提交于 2019-11-27 04:09:21
问题 I am in the early stages of creating an app where I would like to save, sync and backup data. The app will not store any files just data in a database. It is going to be iOS 8 and up so I am able to use CloudKit. I did some research and still not clear on how Core Data, iCloud and CloudKit work together. As far as understand CloudKit is just a way of getting and retrieving data to/from the cloud. Is CloudKit just a different way of syncing data with iCloud? My questions are: If I do use

How to update data in TableView without the delay using CloudKit when Creating new Records

六月ゝ 毕业季﹏ 提交于 2019-11-26 21:52:06
问题 There are 2 View Controllers in my App. The first "MainViewController" displays a tableView with CKRecords fields fetched from the private CloudKit database. Inside the viewWillAppear method of this VC I fetch records from CloudKit and reload data of a tableview to show the latest fetched results that have been previously saved in the CloudKit by the user. The second view controller "CreateRecordViewController" is made for creating CKRecords and saving them to the private database of the

iOS 9 CloudKit: query does not return anything while connected to cellular network

南楼画角 提交于 2019-11-26 21:33:48
问题 I'm developing an app with xcode 7 beta 5. When i run my app on my iphone 6 and i try to connect it to CloudKit if my iphone works in wifi mode all it's ok, i display all my data; but if my iphone works in LTE mode i can't see any kind of data. Does anyone know how to do this? func getRecordsFromCloud() { lavori = [] / let _cloudContainer = CKContainer.defaultContainer() let publicDatabase = CKContainer.defaultContainer().publicCloudDatabase / let predicate = NSPredicate(value: true) let

CKQuery from private zone returns only first 100 CKRecords from in CloudKit

眉间皱痕 提交于 2019-11-26 16:36:17
问题 Is there any limit to the result of a query to Cloudkit private default zone? I have no clue why I only receive first 100 records with the following query: let p = NSPredicate(format: "(type == 'entered') AND (timestamp >= %@) AND (timestamp <= %@)", from, to) let q = CKQuery(recordType: self.beaconRecordType, predicate: p) q.sortDescriptors = [NSSortDescriptor(key: "timestamp", ascending: true)] self.privateDatabase?.performQuery(q, inZoneWithID: nil, completionHandler: { results, error in /