cloudkit-web-services

Is there anyway to import bulk data through the CloudKit Dashboard?

喜夏-厌秋 提交于 2019-12-30 11:02:24
问题 I see how to create record types and add records one at a time in the CloudKit dashboard. I want to try adding a few hundred records for testing. Is there any way to import CSV or JSON files into dashboard? 回答1: No there is not. You have to create an import mechanism in your app. (Or you could use the CloudKit api from another app/website) 回答2: On one hand you can only create records one at a time in the CloudKit dashboard. On the other hand, you can import a CSV or JSON file as a CKAsset

Not sure how to generate an ECDSA signature, given a private key and a message

ぃ、小莉子 提交于 2019-12-22 07:36:37
问题 I'm following Apple's guide towards composing a CloudKit Web Services request. The bit I'm having trouble with is Step 2, under "Authenticate Web Service Requests": Compute the ECDSA signature of this message with your private key. Before getting to this point, I generated my certificate, a .pem file, which when opening it in a text editor shows me my private key, so I have that in string format too. I've also followed the steps for generating what it refers to as a message, which I now have

How can I use CloudKit web services to query based on a reference field?

有些话、适合烂在心里 提交于 2019-12-12 10:48:32
问题 I've got two CloudKit data objects that look somewhat like this: Parent Object: { "records": [ { "recordName": "14102C0A-60F2-4457-AC1C-601BC628BF47-184-000000012D225C57", "recordType": "ParentObject", "fields": { "fsYear": { "value": "2015", "type": "STRING" }, "displayOrder": { "value": 2015221153856287200, "type": "INT64" }, "fjpFSGuidForReference": { "value": "14102C0A-60F2-4457-AC1C-601BC628BF47-184-000000012D225C57", "type": "STRING" }, "fsDateSearch": { "value": "2015221153856287158",

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

Not sure how to generate an ECDSA signature, given a private key and a message

落花浮王杯 提交于 2019-12-05 09:02:49
I'm following Apple's guide towards composing a CloudKit Web Services request. The bit I'm having trouble with is Step 2, under "Authenticate Web Service Requests": Compute the ECDSA signature of this message with your private key. Before getting to this point, I generated my certificate, a .pem file, which when opening it in a text editor shows me my private key, so I have that in string format too. I've also followed the steps for generating what it refers to as a message, which I now have as a string. So given that I have a private key, (or the .pem file if required), and a message as a

Authorization error on call to server-to-server CloudKit Web Services

吃可爱长大的小学妹 提交于 2019-12-05 02:06:27
问题 I'm attempting to implement some basic integration with CloudKit web services, following Apple's guide for authenticating requests. I've followed some help from this and this question as to how to properly authorize requests, and seem to be following all steps correctly, but I'm still getting a 401 AUTHENTICATION_FAILED error from Apple. The endpoint I'm targeting is a POST endpoint for retrieving a record, given a record name. I've added comments to my code to show the outputs i get at

How do I query for nil values with CloudKit.js?

独自空忆成欢 提交于 2019-12-02 07:58:54
问题 Using CloudKit.js, how do I construct a query that matches items where a field is nil? Every permutation I've tried fails - either it's clearly matching on a string value (i.e. "null" or "nil") or it throws an error if I actually try to pass 'null'. Any ideas? None of the below work. filterBy: [{ fieldName: 'customerNumber', comparator: 'EQUALS', fieldValue: { value: "nil" } }] filterBy: [{ fieldName: 'customerNumber', comparator: 'EQUALS', fieldValue: { value: null } }] filterBy: [{

How do I query for nil values with CloudKit.js?

杀马特。学长 韩版系。学妹 提交于 2019-12-02 06:28:40
Using CloudKit.js, how do I construct a query that matches items where a field is nil? Every permutation I've tried fails - either it's clearly matching on a string value (i.e. "null" or "nil") or it throws an error if I actually try to pass 'null'. Any ideas? None of the below work. filterBy: [{ fieldName: 'customerNumber', comparator: 'EQUALS', fieldValue: { value: "nil" } }] filterBy: [{ fieldName: 'customerNumber', comparator: 'EQUALS', fieldValue: { value: null } }] filterBy: [{ fieldName: 'customerNumber', comparator: 'EQUALS', fieldValue: { value: "null" } }] filterBy: [{ fieldName: