From 1992ecd3a26be295c50a5232b4440bc30e942bc8 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Wed, 6 Dec 2023 14:57:02 -0600 Subject: [PATCH] [AltStoreCore] Finalizes StoreCategory icons, colors, and JSON values --- AltStoreCore/Types/StoreCategory.swift | 33 ++++++++++++++++---------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/AltStoreCore/Types/StoreCategory.swift b/AltStoreCore/Types/StoreCategory.swift index bdfa7c7a..c5dda3b4 100644 --- a/AltStoreCore/Types/StoreCategory.swift +++ b/AltStoreCore/Types/StoreCategory.swift @@ -15,7 +15,7 @@ public enum StoreCategory: String, CaseIterable case entertainment case games case lifestyle - case photoAndVideo = "photo" + case photoAndVideo = "photo-video" case social case utilities case other @@ -37,28 +37,37 @@ public enum StoreCategory: String, CaseIterable public var symbolName: String { switch self { - case .developer: "terminal" - case .entertainment: "popcorn" + case .developer: "terminal" // renamed to apple.terminal as of iOS 17 case .games: "gamecontroller" - case .lifestyle: "tree" case .photoAndVideo: "camera" - case .social: "hand.wave" case .utilities: "paperclip" case .other: "square.stack.3d.up" + + case .entertainment: + if #available(iOS 17, *) { "movieclapper" } + else { "tv" } + + case .lifestyle: + if #available(iOS 16.1, *) { "tree" } + else { "sun.max" } + + case .social: + if #available(iOS 17.0, *) { "bubble.left.and.text.bubble.right" } + else { "text.bubble" } } } public var tintColor: UIColor { switch self { - case .developer: UIColor.systemPurple - case .entertainment: UIColor.systemPink - case .games: UIColor.systemGreen - case .lifestyle: UIColor.systemYellow - case .photoAndVideo: UIColor.systemGray - case .social: UIColor.systemRed + case .developer: UIColor.systemOrange + case .entertainment: UIColor.systemRed + case .games: UIColor.systemPurple + case .lifestyle: UIColor.systemGreen + case .photoAndVideo: UIColor.systemPink + case .social: UIColor.systemYellow case .utilities: UIColor.systemBlue - case .other: UIColor.black + case .other: UIColor.systemGray } } }