From 0b56828122a00e0b9c4d23e47af0ec1bfd98c6be Mon Sep 17 00:00:00 2001 From: Nico Hinderling Date: Thu, 11 Dec 2025 16:08:17 -0800 Subject: [PATCH] chore(preprod): Capture scale info for parsedassets --- .../Sources/AssetCatalogParser/AssetCatalogReader.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/AssetCatalogParser/AssetCatalogReader.swift b/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/AssetCatalogParser/AssetCatalogReader.swift index 6d12ac7443..c043fee152 100644 --- a/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/AssetCatalogParser/AssetCatalogReader.swift +++ b/apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/AssetCatalogParser/AssetCatalogReader.swift @@ -42,6 +42,7 @@ struct AssetCatalogEntry: Encodable { let idiom: String? let colorspace: String? let contentHash: String? + let scale: UInt? } enum Error: Swift.Error { @@ -240,6 +241,7 @@ enum AssetUtil { let idiomValue = key.getUInt(forKey: "themeIdiom") let colorSpaceID = rendition.getUInt(forKey: "colorSpaceID") + let scaleValue = key.getUInt(forKey: "themeScale") // Include multisize set name in the name field if it exists let finalName: String @@ -260,7 +262,8 @@ enum AssetUtil { type: assetType, idiom: idiomToString(idiomValue), colorspace: colorSpaceIDToString(colorSpaceID), - contentHash: contentHash + contentHash: contentHash, + scale: scaleValue ) assets.append(asset) } @@ -276,7 +279,8 @@ enum AssetUtil { type: nil, idiom: nil, colorspace: nil, - contentHash: nil + contentHash: nil, + scale: nil )) let data = try! JSONEncoder().encode(assets)