Hi, This problem occurred when I upgraded the sketch to 65. The previous version of 59.6 is normal. Can you tell me the specific reason?
const fileURL = 'https://img02.mockplus.cn/idoc/2020-06-22/40423dc0-b439-11ea-91dd-cfcdfc1984a1.skla';
const url = NSURL.URLWithString(fileURL);
const archiveData = NSData.alloc().initWithContentsOfURL(url);
function stringFromData(data) {
return NSString.alloc().initWithData_encoding(data, NSUTF8StringEncoding);
}
const jsData = JSON.parse(stringFromData(archiveData));
function sketchObjectFromArchiveJSONUsingFormatVersion(jsonString, formatVersion) {
const data = MSJSONDataUnarchiver
.unarchiveObjectWithString_asVersion_corruptionDetected_error(jsonString, formatVersion, null, null);
console.log(data);
}
sketchObjectFromArchiveJSONUsingFormatVersion(JSON.stringify(jsData.root), jsData.version);
Code execution results is
TypeError: MSJSONDataUnarchiver.unarchiveObjectWithString_asVersion_corruptionDetected_error is not a function.