Skip to content

Commit 695d673

Browse files
1 parent 2fcff43 commit 695d673

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

apple-catalog-parsing/native/swift/AssetCatalogParser/Sources/AssetCatalogParser/AssetCatalogReader.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ struct AssetCatalogEntry: Encodable {
4242
let idiom: String?
4343
let colorspace: String?
4444
let contentHash: String?
45+
let scale: UInt?
4546
}
4647

4748
enum Error: Swift.Error {
@@ -240,6 +241,7 @@ enum AssetUtil {
240241

241242
let idiomValue = key.getUInt(forKey: "themeIdiom")
242243
let colorSpaceID = rendition.getUInt(forKey: "colorSpaceID")
244+
let scaleValue = key.getUInt(forKey: "themeScale")
243245

244246
// Include multisize set name in the name field if it exists
245247
let finalName: String
@@ -260,7 +262,8 @@ enum AssetUtil {
260262
type: assetType,
261263
idiom: idiomToString(idiomValue),
262264
colorspace: colorSpaceIDToString(colorSpaceID),
263-
contentHash: contentHash
265+
contentHash: contentHash,
266+
scale: scaleValue
264267
)
265268
assets.append(asset)
266269
}
@@ -276,7 +279,8 @@ enum AssetUtil {
276279
type: nil,
277280
idiom: nil,
278281
colorspace: nil,
279-
contentHash: nil
282+
contentHash: nil,
283+
scale: nil
280284
))
281285

282286
let data = try! JSONEncoder().encode(assets)

0 commit comments

Comments
 (0)