From 81f263c97e93bd1858a86b324f7f72c6024b202d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 18 Jan 2023 15:03:59 -0500 Subject: [PATCH] Make sure to use the old struct name for ObjC types when using the old cluster name. (#894) --- .../matter/darwin/Framework/CHIP/templates/helper.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src-electron/generator/matter/darwin/Framework/CHIP/templates/helper.js b/src-electron/generator/matter/darwin/Framework/CHIP/templates/helper.js index 3433ecec54..48bf2cde67 100644 --- a/src-electron/generator/matter/darwin/Framework/CHIP/templates/helper.js +++ b/src-electron/generator/matter/darwin/Framework/CHIP/templates/helper.js @@ -234,6 +234,11 @@ async function asObjectiveCClass(type, cluster, options) { if (isStruct) { if (options.hash.compatRemapClusterName) { cluster = compatClusterNameRemapping.call(this, cluster, { hash: {} }); + type = oldName.call(this, cluster, { + hash: { + "struct": type + } + }) || type; } else { let preserveAcronyms = true; if ('preserveAcronyms' in options.hash) {