cloudkit

Records, Zone doesn't displayed in Dashboard and Delete Zone issue CloudKit

一世执手 提交于 2020-05-09 06:51:05
问题 I have created a zone for privateCloudDatabase . static var privateCloudDatabase: CKDatabase { let container = CKContainer(identifier: "iCloud.<bundle>") return container.privateCloudDatabase } static func createZone() { let fetchZonesOperation = CKFetchRecordZonesOperation.fetchAllRecordZonesOperation() fetchZonesOperation.fetchRecordZonesCompletionBlock = { (recordZones: [CKRecordZone.ID : CKRecordZone]?, error: Error?) -> Void in guard error == nil else { return } for recordID in

Table Will Not Load/Show CloudKit Data

杀马特。学长 韩版系。学妹 提交于 2020-02-06 10:10:38
问题 I am using CloudKit to store a few arrays, then use the arrays to fill a table. I am reloading the table, but it will not show any data. It should be connected to iCloud because I am still able to add to the database. Code is shown below: import UIKit import CloudKit var selectedCellName = "" class explore: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet var tableView: UITableView! var groupNames = [String]() var Group = [CKRecord]() override func viewDidLoad() {

Table Will Not Load/Show CloudKit Data

戏子无情 提交于 2020-02-06 10:03:25
问题 I am using CloudKit to store a few arrays, then use the arrays to fill a table. I am reloading the table, but it will not show any data. It should be connected to iCloud because I am still able to add to the database. Code is shown below: import UIKit import CloudKit var selectedCellName = "" class explore: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet var tableView: UITableView! var groupNames = [String]() var Group = [CKRecord]() override func viewDidLoad() {

Bug Check: CloudKit MacCatalyst didReceiveRemoteNotification

ぐ巨炮叔叔 提交于 2020-02-04 22:56:58
问题 I am using MacCatalyst to port an iOS/iPadOS app to MacOS. The app uses CloudKit and functions in all ways except one: the UIApplicationDelegate method, didReceiveRemoteNotification , is not called on the MacOS version when a CloudKit update is submitted from another device Things that do work in the app: Submitting CKDatabaseOperation s including updates and subscriptions to CloudKit Manually retrieving database updates from CloudKit UIApplicationDelegate method

How to Utilize Fetched Record Attributes with CloudKit?

瘦欲@ 提交于 2020-01-17 03:06:25
问题 so I'm trying to query my public database for a single record using CloudKit, and save an attribute value from the record to an external array(foodArrayLunch). I'm using the property RecordFetchedBlock in a closure to process my record. However, when the closure executes successfully, I find that my array failed to save the attribute value that was queried from the database, and it can be accessed and managed only from inside the closure. So my question is: How can I save this attribute value

CKContainer accountStatusWithCompletionHandler returns wrong value

主宰稳场 提交于 2020-01-14 13:49:12
问题 accountStatusWithCompletionHandler method returns .NoAccount value. Any idea why returned value is not .Available ? I am logged in to iCloud, and connecting to internet. Doc says .NoAccount means: The user’s iCloud account is not available because no account information has been provided for this device. I do not receive any error. The reason may be that app is not using private database? Doc says: Call this method before accessing the private database to determine whether that database is

UICloudSharingController shows infinite activity indicatory in Xcode 11

一个人想着一个人 提交于 2020-01-14 09:32:12
问题 I have the following code to import the UICloudSharingController into swift UI but when integrated the first time up it just shows an activity indicator that never stops and then the second time it is presented (via .sheet), there is no activity indicator. The first time up I can see the close button to the top right corder with activity indicator. Any feedback would be appreciated. struct CloudSharingController: UIViewControllerRepresentable { typealias UIViewControllerType =

CloudKit CKdatabaseOperation does not throw error in simulator depending on .qualityOfService setting

家住魔仙堡 提交于 2020-01-14 04:44:04
问题 I am basically messing around with CloudKit. I have 2 questions that I would like some help/education with. (1) When I try to run the following code in the simulator with WiFi Turned off (To simulate network unavailability), I expect it to throw network unavailable error. However, cloudKit does not throw any error and the function does not do anything either i.e. does not execute either of the print statements inside the modifyRecordZonesCompletionBlock self.container = CKContainer.default()

iCloud versus iCloud Drive versus CloudKit

倖福魔咒の 提交于 2020-01-14 03:16:07
问题 Would I be correct in assuming that a user of my iOS app that uses CloudKit would not need to pay a monthly fee to Apple to use my CloudKit app? Apple just changed from annual to monthly for anything above 5GB for iCloud... or is it unrelated? I've been hunting around Apples development site and I cannot seem to find a reference for who gets charged a fee for use of CloudKit. WWDC made brief reference that there is a limit that can be reached and it seemed like they were indicating that the

CKContainer.discoverAllIdentities always fails

别等时光非礼了梦想. 提交于 2020-01-12 07:14:09
问题 The CKContainer.discoverAllIdentities request always fails in my CloudKit app. It has continually failed over the course of several days. A simplified version of the code that is failing (which results in the same error) is: private func getContacts(completion: (([CKUserIdentity]?) -> Void)?) { container.status(forApplicationPermission: .userDiscoverability) { [weak self] status, error in if let error = error { print(error) } switch status { case .granted: self?.discover(completion: