cloudkit

“Couldn't send a valid signature” error when using CloudKit without iCloud account

ε祈祈猫儿з 提交于 2019-11-29 06:33:40
I have submitted an iOS app that uses CloudKit to Apple. It's being rejected because it requires user to sign into iCloud for access. Apple's reasoning is that even without iCloud sign-in, the public database is still readable. So that part of the app should function. I am trying to modify the app but I continue to get this error when I am not signed in. <CKError 0x8141a360: "Internal Error" (1/4000); "Couldn't send a valid signature"> I have searched the web and the solution is always just to sign into iCloud. There is no Apple documentation regarding this error either. Does anyone know how

CloudKit count records

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 03:35:40
I have a "table" that can potentially have many records, when adding a new record I need to know how many records there already are in current table as I use it in calculation of some values. The closest thing I could find is requesting all entries like this: var query : CKQuery = CKQuery(recordType: "Stars", predicate: NSPredicate(format: "mass > 0")) var request : CKQueryOperation = CKQueryOperation(query: query) var starCount = 0 request.queryCompletionBlock = { (cursor:CKQueryCursor!, error:NSError!) in if error { completionHandler(ECOResponse.error(error.description), starCount) } else {

How do I delete a CloudKit container?

这一生的挚爱 提交于 2019-11-29 02:06:42
问题 I accidentally created a new container in CloudKit, and it is really annoying that it comes up when I open dashboard. Any suggestion how to delete? On developer.apple.com I don't see a delete button for containers. 回答1: Apple's iOS CloudKit documentation: Enable iCloud and Select CloudKit Important: When you select CloudKit, Xcode creates a default container ID based on the bundle ID. Because you can’t delete iCloud containers , verify that your bundle ID is correct in the General pane in

CloudKit - no server-side logic?

三世轮回 提交于 2019-11-28 23:14:50
问题 With CloudKit, you can focus on your client-side app development and let iCloud eliminate the need to write server-side application logic . CloudKit provides you with Authentication, private and public database, structured and asset storage services — all for free with very high limits. You cannot upload any code to run on Apple's servers? I've heard it being compared to Google App Engine and other cloud computing platforms, but without the ability to run your own code, isn't the whole thing

How to sync records between Core Data and CloudKit efficiently

為{幸葍}努か 提交于 2019-11-28 21:05:30
问题 I'm currently learning how to use CloudKit Framework and lack of documentation or examples showing how to sync Core Data and CloudKit. I have watched all WWDC videos (2014, 2015, 2016) Dedicated to CloudKit, but none of them telling us how to implement syncing with Core Data. I can't find any fresh examples, tutorial or books, showing how to implement this syncing. I know that it is effective to use Operations API by CloudKit (not Convenience API) and to Subscribe to changes as it said in the

CloudKit Server-to-Server authentication

拈花ヽ惹草 提交于 2019-11-28 16:53:46
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 this: X-Apple-CloudKit-Request-KeyID: [keyID] X-Apple-CloudKit-Request-ISO8601Date: [date] X-Apple

Use production CloudKit during development?

℡╲_俬逩灬. 提交于 2019-11-28 14:39:02
问题 My iOS and Mac apps have been launched to the App Store and all of my users, including myself, are using the CloudKit production database. My question is, is there any way to target the production environment for my development builds? It seems there is no way to target the production environment outside of the Mac App Store, and for iOS, only Ad Hoc distribution can target the production environment. 回答1: Add the following entry to your entitlements file and perform a clean build. This

CKFetchNotificationChangesOperation sometimes does not return UPDATE, DELETE notifications

允我心安 提交于 2019-11-28 13:30:26
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 not use any alertBody , so notification is a so called silent notification, can it be the cause? In

CloudKit push notifications on record update stopped working

我只是一个虾纸丫 提交于 2019-11-28 12:21:29
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 for all three options as I checked on the dashboard and the application is registered for

CloudKit Batch Fetches?

笑着哭i 提交于 2019-11-28 09:51:54
问题 Using CloudKit, how can I fetch my results in batches? I know that the default fetch limit it 100 results. So who do I then fetch the subsequent 100 results? Thanks. 回答1: The number of records returned by CloudKit is not fixed. CloudKit has a mechanism for deciding how many records to return. It looks like it's currently 100, but it could change depending on the current load on Cloudkit. It is possible to set this to a fixed number on the CKQueryOperation object. The default is: operation