我试图将对象保存到CloudKit记录 my CloudKit model
function parseBatchResponse(response) {
// Not the same delimiter in the response as we specify ourselves in the request,
// so we have to extract it.
var delimiter = response.substr(0, response.indexOf('\r\n'));
var parts = response.split(delimiter);
// The first part will always be an empty string. Just remove it.
parts.shift();
// The last part will be the "--". Just remove it.
parts.pop();
var result = [];
for (var i = 0; i < parts.length; i++) {
var part = parts[i];
var p = part.substring(part.indexOf("{"), part.lastIndexOf("}") + 1);
result.push(JSON.parse(p));
}
return result;
}
答案 0 :(得分:0)
我最终在谷歌搜索“cloudkit此请求需要经过身份验证的帐户”。对我来说问题是我没有在模拟器中登录iCloud。