Skip to content

Commit

Permalink
Feat: Add Christmas icon
Browse files Browse the repository at this point in the history
  • Loading branch information
autoreleasefool committed Nov 30, 2023
1 parent 8573e64 commit 0c821c8
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ios/Approach/Sources/AssetsLibrary/AppIcon.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
public enum AppIcon: String, CaseIterable, Identifiable {
case primary = "AppIcon"
case christmas = "AppIcon-Christmas"
case bisexual = "AppIcon-Bisexual"
case pride = "AppIcon-Pride"
case trans = "AppIcon-Trans"
Expand All @@ -9,6 +10,7 @@ public enum AppIcon: String, CaseIterable, Identifiable {
public var category: Category {
switch self {
case .primary: return .standard
case .christmas: return .seasonal
case .bisexual, .pride, .trans: return .pride
}
}
Expand All @@ -17,6 +19,7 @@ public enum AppIcon: String, CaseIterable, Identifiable {
extension AppIcon {
public enum Category: Int, CaseIterable, Identifiable {
case standard
case seasonal
case pride

public var id: Int { rawValue }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ extension AppIcon.Category: CustomStringConvertible {
switch self {
case .pride: return Strings.App.Icon.Category.pride
case .standard: return Strings.App.Icon.Category.standard
case .seasonal: return Strings.App.Icon.Category.seasonal
}
}
}
Expand All @@ -200,6 +201,7 @@ extension AppIcon: CustomStringConvertible {
public var description: String {
switch self {
case .bisexual: return Strings.App.Icon.bisexual
case .christmas: return Strings.App.Icon.christmas
case .pride: return Strings.App.Icon.pride
case .primary: return Strings.App.Icon.primary
case .trans: return Strings.App.Icon.trans
Expand All @@ -210,7 +212,7 @@ extension AppIcon: CustomStringConvertible {
extension AppIcon {
public var isProRequired: Bool {
switch self {
case .primary, .bisexual, .pride, .trans: return false
case .primary, .bisexual, .pride, .trans, .christmas: return false
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions ios/Approach/Sources/StringsLibrary/Strings+Generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ public enum Strings {
public enum Icon {
/// Bisexual Pride
public static let bisexual = Strings.tr("Localizable", "app.icon.bisexual", fallback: "Bisexual Pride")
/// Christmas
public static let christmas = Strings.tr("Localizable", "app.icon.christmas", fallback: "Christmas")
/// Current icon
public static let current = Strings.tr("Localizable", "app.icon.current", fallback: "Current icon")
/// Pride
Expand All @@ -223,6 +225,8 @@ public enum Strings {
public enum Category {
/// Pride
public static let pride = Strings.tr("Localizable", "app.icon.category.pride", fallback: "Pride")
/// Seasonal
public static let seasonal = Strings.tr("Localizable", "app.icon.category.seasonal", fallback: "Seasonal")
/// Standard
public static let standard = Strings.tr("Localizable", "app.icon.category.standard", fallback: "Standard")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,11 @@
"app.tabs.statistics" = "Statistics";
"tab" = "Tab";
"app.icon.category.pride" = "Pride";
"app.icon.category.seasonal" = "Seasonal";
"app.icon.category.standard" = "Standard";
"app.icon.primary" = "Primary";
"app.icon.bisexual" = "Bisexual Pride";
"app.icon.christmas" = "Christmas";
"app.icon.pride" = "Pride";
"app.icon.trans" = "Trans Pride";
"app.icon.current" = "Current icon";
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"images" : [
{
"filename" : "AppIcon-Christmas.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
2 changes: 1 addition & 1 deletion ios/ApproachIOS/XCConfigs/AppApproach.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ INFOPLIST_KEY_LSApplicationCategoryType = public.app-category.sports
PRODUCT_BUNDLE_IDENTIFIER = $(PRODUCT_BUNDLE_IDENTIFIER_$(CONFIGURATION))
PRODUCT_BUNDLE_IDENTIFIER_Debug = ca.josephroque.approach.debug
PRODUCT_BUNDLE_IDENTIFIER_Release = ca.josephroque.approach
ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = AppIcon-Bisexual AppIcon-Pride AppIcon-Trans AppIcon-Default
ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = AppIcon-Christmas AppIcon-Bisexual AppIcon-Pride AppIcon-Trans AppIcon-Default
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES

TELEMETRY_DECK_API_KEY = $(TELEMETRY_DECK_API_KEY_$(CONFIGURATION))
Expand Down

0 comments on commit 0c821c8

Please sign in to comment.