From ea8cd5621627c9902cef4829e84e1211cd6f10af Mon Sep 17 00:00:00 2001 From: dadachi Date: Tue, 31 Mar 2026 09:32:05 +0900 Subject: [PATCH 01/10] Replace asset catalog colors with palette-based color system Remove Colours folder from Assets.xcassets (43 colorsets) and UIColor+Extensions.swift. Add full palette-based Color+Extensions.swift with 60 palette colors, semantic color definitions, ShapeStyle conformance, and hex initializer. Replace all system color usages (.red, .white, .black, .blue) across UI files with semantic palette colors (validationError, arrowBackground, serverForeground, etc.). Co-Authored-By: Claude Opus 4.6 (1M context) --- NativeAppTemplate.xcodeproj/project.pbxproj | 4 - .../Colours/Backgrounds/Contents.json | 6 - .../backgroundColor.colorset/Contents.json | 20 - .../cardBackground.colorset/Contents.json | 20 - .../Contents.json | 20 - .../Contents.json | 20 - .../Contents.json | 20 - .../Contents.json | 20 - .../failureBackground.colorset/Contents.json | 20 - .../successBackground.colorset/Contents.json | 20 - .../Contents.json | 20 - .../Colours/Button/Contents.json | 6 - .../Contents.json | 20 - .../Contents.json | 20 - .../Contents.json | 20 - .../Contents.json | 20 - .../Contents.json | 20 - .../Contents.json | 20 - .../Assets.xcassets/Colours/Contents.json | 6 - .../Colours/Snackbar/Contents.json | 6 - .../Snackbar/error.colorset/Contents.json | 20 - .../Snackbar/snackText.colorset/Contents.json | 20 - .../Snackbar/success.colorset/Contents.json | 20 - .../Snackbar/warning.colorset/Contents.json | 20 - .../Colours/Tags/Contents.json | 6 - .../Contents.json | 20 - .../completedTagBorder.colorset/Contents.json | 20 - .../Contents.json | 20 - .../Contents.json | 20 - .../Contents.json | 20 - .../Contents.json | 20 - .../Contents.json | 20 - .../idlingTagBorder.colorset/Contents.json | 20 - .../Contents.json | 20 - .../Colours/Text/Contents.json | 6 - .../Contents.json | 20 - .../Contents.json | 20 - .../Text/contentText.colorset/Contents.json | 56 -- .../Text/secondaryText.colorset/Contents.json | 56 -- .../Text/titleText.colorset/Contents.json | 20 - .../Colours/Write to Tag/Contents.json | 6 - .../customerBackground.colorset/Contents.json | 20 - .../customerForeground.colorset/Contents.json | 20 - .../lockBackground.colorset/Contents.json | 20 - .../lockForeground.colorset/Contents.json | 20 - .../serverBackground.colorset/Contents.json | 20 - .../serverForeground.colorset/Contents.json | 20 - .../Colours/accent.colorset/Contents.json | 20 - .../Colours/alarm.colorset/Contents.json | 20 - .../lightestAccent.colorset/Contents.json | 20 - NativeAppTemplate/Constants.swift | 2 +- NativeAppTemplate/Logging/Logger.swift | 8 +- .../Network/CertificatePinningDelegate.swift | 26 +- .../Networking/Services/Service.swift | 4 +- .../Styleguide/Color+Extensions.swift | 484 +++++++++++++++++- .../Styleguide/UIColor+Extensions.swift | 12 - .../UI/App Root/AppTabView.swift | 2 +- .../UI/App Root/ForgotPasswordView.swift | 4 +- .../ResendConfirmationInstructionsView.swift | 4 +- .../App Root/SignInEmailAndPasswordView.swift | 8 +- .../UI/App Root/SignUpView.swift | 10 +- .../UI/Scan/CompleteScanResultView.swift | 1 + NativeAppTemplate/UI/Scan/ScanView.swift | 2 +- .../UI/Scan/ShowTagInfoScanResultView.swift | 40 +- .../UI/Settings/PasswordEditView.swift | 8 +- .../UI/Settings/ShopkeeperEditView.swift | 6 +- .../UI/Shared/MainButtonView.swift | 4 +- .../UI/Shared/Tags/TagView.swift | 12 +- .../UI/Shop Detail/ShopDetailView.swift | 2 +- .../UI/Shop List/ShopCreateView.swift | 2 +- .../ItemTag Detail/ItemTagEditView.swift | 2 +- .../ItemTag List/ItemTagCreateView.swift | 2 +- .../ItemTag List/ItemTagListView.swift | 2 +- .../Shop Settings/ShopBasicSettingsView.swift | 2 +- .../Utilities/QRCodeGenerator.swift | 2 +- .../Utilities/UtilityTest.swift | 1 - 76 files changed, 558 insertions(+), 1052 deletions(-) delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/backgroundColor.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/cardBackground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredPrimaryBackground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredPrimaryForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredSecondaryBackground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredSecondaryForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/failureBackground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/successBackground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/successSecondaryForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Button/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Button/coloredPrimaryButtonForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Button/coloredSecondaryButtonForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Button/destructiveButtonForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Button/failureSecondaryForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Button/primaryButtonForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Button/secondaryButtonForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Snackbar/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Snackbar/error.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Snackbar/snackText.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Snackbar/success.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Snackbar/warning.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Tags/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Tags/completedTagBackground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Tags/completedTagBorder.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Tags/completedTagForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Tags/customerScannedTagBackground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Tags/customerScannedTagBorder.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Tags/customerScannedTagForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Tags/idlingTagBackground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Tags/idlingTagBorder.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Tags/idlingTagForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Text/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Text/coloredPrimaryFootnoteText.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Text/coloredSecondaryFootnoteText.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Text/contentText.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Text/secondaryText.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Text/titleText.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/customerBackground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/customerForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/lockBackground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/lockForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/serverBackground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/serverForeground.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/accent.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/alarm.colorset/Contents.json delete mode 100644 NativeAppTemplate/Assets.xcassets/Colours/lightestAccent.colorset/Contents.json delete mode 100644 NativeAppTemplate/Styleguide/UIColor+Extensions.swift diff --git a/NativeAppTemplate.xcodeproj/project.pbxproj b/NativeAppTemplate.xcodeproj/project.pbxproj index 78c849f..1c1239d 100644 --- a/NativeAppTemplate.xcodeproj/project.pbxproj +++ b/NativeAppTemplate.xcodeproj/project.pbxproj @@ -67,7 +67,6 @@ 0172046925AA82BF008FD63B /* PermissionsLoadingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0172045D25AA82B4008FD63B /* PermissionsLoadingView.swift */; }; 0172047925AA8335008FD63B /* UIFont+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0172046E25AA8325008FD63B /* UIFont+Extensions.swift */; }; 0172047E25AA8343008FD63B /* Font+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0172047525AA8325008FD63B /* Font+Extensions.swift */; }; - 0172048025AA8343008FD63B /* UIColor+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0172047425AA8325008FD63B /* UIColor+Extensions.swift */; }; 0172048125AA8343008FD63B /* Color+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0172047625AA8325008FD63B /* Color+Extensions.swift */; }; 017204B625AA8467008FD63B /* DataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0172049225AA8449008FD63B /* DataManager.swift */; }; 017204C025AA846D008FD63B /* TabViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0172049925AA8449008FD63B /* TabViewModel.swift */; }; @@ -242,7 +241,6 @@ 0172045C25AA82B4008FD63B /* SnackbarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnackbarView.swift; sourceTree = ""; }; 0172045D25AA82B4008FD63B /* PermissionsLoadingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionsLoadingView.swift; sourceTree = ""; }; 0172046E25AA8325008FD63B /* UIFont+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+Extensions.swift"; sourceTree = ""; }; - 0172047425AA8325008FD63B /* UIColor+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Extensions.swift"; sourceTree = ""; }; 0172047525AA8325008FD63B /* Font+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Font+Extensions.swift"; sourceTree = ""; }; 0172047625AA8325008FD63B /* Color+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Extensions.swift"; sourceTree = ""; }; 0172049225AA8449008FD63B /* DataManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataManager.swift; sourceTree = ""; }; @@ -717,7 +715,6 @@ 018D4EFB2B6350CB00CBA736 /* Inter */, 0172047625AA8325008FD63B /* Color+Extensions.swift */, 0172047525AA8325008FD63B /* Font+Extensions.swift */, - 0172047425AA8325008FD63B /* UIColor+Extensions.swift */, 0172046E25AA8325008FD63B /* UIFont+Extensions.swift */, ); path = Styleguide; @@ -1111,7 +1108,6 @@ 01D85AF32E07D37E00A95798 /* ItemTagListViewModel.swift in Sources */, 0172047E25AA8343008FD63B /* Font+Extensions.swift in Sources */, 0172034825A9642E008FD63B /* Request.swift in Sources */, - 0172048025AA8343008FD63B /* UIColor+Extensions.swift in Sources */, 01DCE23F298FA3B300BA311D /* ShopListCardView.swift in Sources */, 011DDC2328766C5E00C6C21F /* SignUpService.swift in Sources */, 01E2477229A5E30400D4B00D /* Utility.swift in Sources */, diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/backgroundColor.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/backgroundColor.colorset/Contents.json deleted file mode 100644 index 1378feb..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/backgroundColor.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x1E", - "green" : "0x16", - "red" : "0x14" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/cardBackground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/cardBackground.colorset/Contents.json deleted file mode 100644 index 1378feb..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/cardBackground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x1E", - "green" : "0x16", - "red" : "0x14" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredPrimaryBackground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredPrimaryBackground.colorset/Contents.json deleted file mode 100644 index dea20a0..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredPrimaryBackground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xFF", - "green" : "0xF8", - "red" : "0xE3" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredPrimaryForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredPrimaryForeground.colorset/Contents.json deleted file mode 100644 index 15e2907..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredPrimaryForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x88", - "green" : "0x53", - "red" : "0x03" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredSecondaryBackground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredSecondaryBackground.colorset/Contents.json deleted file mode 100644 index 9cdca7e..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredSecondaryBackground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xFA", - "green" : "0xF7", - "red" : "0xF5" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredSecondaryForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredSecondaryForeground.colorset/Contents.json deleted file mode 100644 index 6204bd1..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/coloredSecondaryForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x33", - "green" : "0x29", - "red" : "0x1F" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/failureBackground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/failureBackground.colorset/Contents.json deleted file mode 100644 index 17bc8b7..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/failureBackground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x42", - "green" : "0x00", - "red" : "0x62" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/successBackground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/successBackground.colorset/Contents.json deleted file mode 100644 index 47b7a58..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/successBackground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x40", - "green" : "0x4D", - "red" : "0x01" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/successSecondaryForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/successSecondaryForeground.colorset/Contents.json deleted file mode 100644 index 4b343d1..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Backgrounds/successSecondaryForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xE2", - "green" : "0xF7", - "red" : "0xC6" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Button/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Button/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Button/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Button/coloredPrimaryButtonForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Button/coloredPrimaryButtonForeground.colorset/Contents.json deleted file mode 100644 index 15e2907..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Button/coloredPrimaryButtonForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x88", - "green" : "0x53", - "red" : "0x03" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Button/coloredSecondaryButtonForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Button/coloredSecondaryButtonForeground.colorset/Contents.json deleted file mode 100644 index 6204bd1..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Button/coloredSecondaryButtonForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x33", - "green" : "0x29", - "red" : "0x1F" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Button/destructiveButtonForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Button/destructiveButtonForeground.colorset/Contents.json deleted file mode 100644 index 9cdca7e..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Button/destructiveButtonForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xFA", - "green" : "0xF7", - "red" : "0xF5" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Button/failureSecondaryForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Button/failureSecondaryForeground.colorset/Contents.json deleted file mode 100644 index 1c6de4c..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Button/failureSecondaryForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xD2", - "green" : "0xB8", - "red" : "0xFF" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Button/primaryButtonForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Button/primaryButtonForeground.colorset/Contents.json deleted file mode 100644 index 9cdca7e..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Button/primaryButtonForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xFA", - "green" : "0xF7", - "red" : "0xF5" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Button/secondaryButtonForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Button/secondaryButtonForeground.colorset/Contents.json deleted file mode 100644 index 9cdca7e..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Button/secondaryButtonForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xFA", - "green" : "0xF7", - "red" : "0xF5" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/error.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/error.colorset/Contents.json deleted file mode 100644 index 1378feb..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/error.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x1E", - "green" : "0x16", - "red" : "0x14" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/snackText.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/snackText.colorset/Contents.json deleted file mode 100644 index c6e5d3d..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/snackText.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - }, - "colors" : [ - { - "idiom" : "universal", - "color" : { - "color-space" : "srgb", - "components" : { - "red" : "1.000", - "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000" - } - } - } - ] -} \ No newline at end of file diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/success.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/success.colorset/Contents.json deleted file mode 100644 index 1378feb..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/success.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x1E", - "green" : "0x16", - "red" : "0x14" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/warning.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/warning.colorset/Contents.json deleted file mode 100644 index 7e8f38f..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Snackbar/warning.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x00", - "green" : "0x00", - "red" : "0x00" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Tags/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Tags/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Tags/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Tags/completedTagBackground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Tags/completedTagBackground.colorset/Contents.json deleted file mode 100644 index 4b343d1..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Tags/completedTagBackground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xE2", - "green" : "0xF7", - "red" : "0xC6" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Tags/completedTagBorder.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Tags/completedTagBorder.colorset/Contents.json deleted file mode 100644 index 97650a1..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Tags/completedTagBorder.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000", - "red" : "1.000" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Tags/completedTagForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Tags/completedTagForeground.colorset/Contents.json deleted file mode 100644 index 47b7a58..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Tags/completedTagForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x40", - "green" : "0x4D", - "red" : "0x01" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Tags/customerScannedTagBackground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Tags/customerScannedTagBackground.colorset/Contents.json deleted file mode 100644 index 1c6de4c..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Tags/customerScannedTagBackground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xD2", - "green" : "0xB8", - "red" : "0xFF" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Tags/customerScannedTagBorder.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Tags/customerScannedTagBorder.colorset/Contents.json deleted file mode 100644 index 97650a1..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Tags/customerScannedTagBorder.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000", - "red" : "1.000" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Tags/customerScannedTagForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Tags/customerScannedTagForeground.colorset/Contents.json deleted file mode 100644 index 17bc8b7..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Tags/customerScannedTagForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x42", - "green" : "0x00", - "red" : "0x62" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Tags/idlingTagBackground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Tags/idlingTagBackground.colorset/Contents.json deleted file mode 100644 index c6fec15..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Tags/idlingTagBackground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xEB", - "green" : "0xE7", - "red" : "0xE4" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Tags/idlingTagBorder.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Tags/idlingTagBorder.colorset/Contents.json deleted file mode 100644 index 97650a1..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Tags/idlingTagBorder.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000", - "red" : "1.000" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Tags/idlingTagForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Tags/idlingTagForeground.colorset/Contents.json deleted file mode 100644 index 6204bd1..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Tags/idlingTagForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x33", - "green" : "0x29", - "red" : "0x1F" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Text/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Text/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Text/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Text/coloredPrimaryFootnoteText.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Text/coloredPrimaryFootnoteText.colorset/Contents.json deleted file mode 100644 index 0ce6eec..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Text/coloredPrimaryFootnoteText.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xA3", - "green" : "0x69", - "red" : "0x0B" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Text/coloredSecondaryFootnoteText.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Text/coloredSecondaryFootnoteText.colorset/Contents.json deleted file mode 100644 index ef05487..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Text/coloredSecondaryFootnoteText.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x4B", - "green" : "0x3F", - "red" : "0x32" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Text/contentText.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Text/contentText.colorset/Contents.json deleted file mode 100644 index ee43475..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Text/contentText.colorset/Contents.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0.529", - "green" : "0.463", - "red" : "0.431" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "light" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0.525", - "green" : "0.463", - "red" : "0.427" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xB1", - "green" : "0xA5", - "red" : "0x9A" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Text/secondaryText.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Text/secondaryText.colorset/Contents.json deleted file mode 100644 index a0f9bb9..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Text/secondaryText.colorset/Contents.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x7C", - "green" : "0x6E", - "red" : "0x61" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "light" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x7C", - "green" : "0x6E", - "red" : "0x61" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x7C", - "green" : "0x6E", - "red" : "0x61" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Text/titleText.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Text/titleText.colorset/Contents.json deleted file mode 100644 index fafa476..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Text/titleText.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xFF", - "green" : "0xFF", - "red" : "0xFF" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/customerBackground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/customerBackground.colorset/Contents.json deleted file mode 100644 index dea20a0..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/customerBackground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xFF", - "green" : "0xF8", - "red" : "0xE3" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/customerForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/customerForeground.colorset/Contents.json deleted file mode 100644 index 15e2907..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/customerForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x88", - "green" : "0x53", - "red" : "0x03" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/lockBackground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/lockBackground.colorset/Contents.json deleted file mode 100644 index 1e684e1..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/lockBackground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xEA", - "green" : "0xFB", - "red" : "0xFF" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/lockForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/lockForeground.colorset/Contents.json deleted file mode 100644 index 2311ae5..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/lockForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x0B", - "green" : "0x2B", - "red" : "0x8D" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/serverBackground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/serverBackground.colorset/Contents.json deleted file mode 100644 index 937e5f4..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/serverBackground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xEC", - "green" : "0xE3", - "red" : "0xFF" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/serverForeground.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/serverForeground.colorset/Contents.json deleted file mode 100644 index 17bc8b7..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/Write to Tag/serverForeground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x42", - "green" : "0x00", - "red" : "0x62" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/accent.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/accent.colorset/Contents.json deleted file mode 100644 index 95c66bb..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/accent.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xFA", - "green" : "0xD0", - "red" : "0x5E" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/alarm.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/alarm.colorset/Contents.json deleted file mode 100644 index da33105..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/alarm.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x4E", - "green" : "0x4E", - "red" : "0xEF" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Assets.xcassets/Colours/lightestAccent.colorset/Contents.json b/NativeAppTemplate/Assets.xcassets/Colours/lightestAccent.colorset/Contents.json deleted file mode 100644 index dea20a0..0000000 --- a/NativeAppTemplate/Assets.xcassets/Colours/lightestAccent.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xFF", - "green" : "0xF8", - "red" : "0xE3" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/NativeAppTemplate/Constants.swift b/NativeAppTemplate/Constants.swift index df8461f..9bf19a0 100644 --- a/NativeAppTemplate/Constants.swift +++ b/NativeAppTemplate/Constants.swift @@ -3,8 +3,8 @@ // NativeAppTemplate // -import SwiftUI import typealias Foundation.TimeInterval +import SwiftUI extension Int { static let minimumPasswordLength: Int = 8 diff --git a/NativeAppTemplate/Logging/Logger.swift b/NativeAppTemplate/Logging/Logger.swift index 4f2c636..fede01f 100644 --- a/NativeAppTemplate/Logging/Logger.swift +++ b/NativeAppTemplate/Logging/Logger.swift @@ -69,9 +69,9 @@ struct Failure { func log() { appLogger.error( """ - \(self.action, privacy: .public) \ - source=\(self.source, privacy: .public) \ - reason=\(self.reason, privacy: .private) + \(action, privacy: .public) \ + source=\(source, privacy: .public) \ + reason=\(reason, privacy: .private) """ ) } @@ -99,6 +99,6 @@ struct Event { private let action: String func log() { - appLogger.info("EVENT:: source: \(self.source, privacy: .public), action: \(self.action, privacy: .public)") + appLogger.info("EVENT:: source: \(source, privacy: .public), action: \(action, privacy: .public)") } } diff --git a/NativeAppTemplate/Networking/Network/CertificatePinningDelegate.swift b/NativeAppTemplate/Networking/Network/CertificatePinningDelegate.swift index ac18604..1cbe7ec 100644 --- a/NativeAppTemplate/Networking/Network/CertificatePinningDelegate.swift +++ b/NativeAppTemplate/Networking/Network/CertificatePinningDelegate.swift @@ -2,16 +2,14 @@ // CertificatePinningDelegate.swift // NativeAppTemplate // -// Created by Daisuke Adachi. -// import CommonCrypto import Foundation final class CertificatePinningDelegate: NSObject, URLSessionDelegate { - // SPKI SHA-256 hashes (base64-encoded) for api.nativeapptemplate.com - // The server uses Google Trust Services certificates (Render hosting). - // Pin the leaf public key and Google Trust Services intermediate CAs as backup. + /// SPKI SHA-256 hashes (base64-encoded) for api.nativeapptemplate.com + /// The server uses Google Trust Services certificates (Render hosting). + /// Pin the leaf public key and Google Trust Services intermediate CAs as backup. static let pinnedHashes: Set = [ // Leaf certificate public key (api.nativeapptemplate.com) "54Il7gpV4QvX8fAyEKV+6fp8VGjgHqIAAqF5bLCfYNQ=", @@ -21,19 +19,19 @@ final class CertificatePinningDelegate: NSObject, URLSessionDelegate { static let pinnedDomain = String.domain - // ASN.1 header for EC 256-bit public key (SPKI prefix) + /// ASN.1 header for EC 256-bit public key (SPKI prefix) private static let ecDsaSecp256r1Asn1Header: [UInt8] = [ - 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2A, 0x86, - 0x48, 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x08, 0x2A, - 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07, 0x03, + 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, + 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, + 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00 ] - // ASN.1 header for RSA 2048-bit public key (SPKI prefix) + /// ASN.1 header for RSA 2048-bit public key (SPKI prefix) private static let rsa2048Asn1Header: [UInt8] = [ - 0x30, 0x82, 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, - 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, - 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0F, 0x00 + 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, + 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, + 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00 ] func urlSession( @@ -52,7 +50,7 @@ final class CertificatePinningDelegate: NSObject, URLSessionDelegate { let certificateCount = SecTrustGetCertificateCount(serverTrust) var pinMatched = false - for index in 0..> 8) * 17, (int >> 4 & 0xf) * 17, (int & 0xf) * 17) + case 6: // RGB (24-bit) + (alpha, red, green, blue) = (255, int >> 16, int >> 8 & 0xff, int & 0xff) + case 8: // ARGB (32-bit) + (alpha, red, green, blue) = (int >> 24, int >> 16 & 0xff, int >> 8 & 0xff, int & 0xff) + default: + (alpha, red, green, blue) = (255, 0, 0, 0) + } + self.init( + .sRGB, + red: Double(red) / 255, + green: Double(green) / 255, + blue: Double(blue) / 255, + opacity: Double(alpha) / 255 + ) } } diff --git a/NativeAppTemplate/Styleguide/UIColor+Extensions.swift b/NativeAppTemplate/Styleguide/UIColor+Extensions.swift deleted file mode 100644 index f0d74c8..0000000 --- a/NativeAppTemplate/Styleguide/UIColor+Extensions.swift +++ /dev/null @@ -1,12 +0,0 @@ -// -// UIColor+Extensions.swift -// NativeAppTemplate -// - -import UIKit - -extension UIColor { - static var backgroundUiColor: UIColor { - UIColor(named: "backgroundColor")! - } -} diff --git a/NativeAppTemplate/UI/App Root/AppTabView.swift b/NativeAppTemplate/UI/App Root/AppTabView.swift index 842a994..820a5dc 100644 --- a/NativeAppTemplate/UI/App Root/AppTabView.swift +++ b/NativeAppTemplate/UI/App Root/AppTabView.swift @@ -86,7 +86,7 @@ extension AppTabView: View { .onChange(of: sessionController.shouldPopToRootView) { if sessionController.shouldPopToRootView { navigationPathShops = NavigationPath() - sessionController.shouldPopToRootView = false + sessionController.shouldPopToRootView = false } } } diff --git a/NativeAppTemplate/UI/App Root/ForgotPasswordView.swift b/NativeAppTemplate/UI/App Root/ForgotPasswordView.swift index 474a993..5baca37 100644 --- a/NativeAppTemplate/UI/App Root/ForgotPasswordView.swift +++ b/NativeAppTemplate/UI/App Root/ForgotPasswordView.swift @@ -53,10 +53,10 @@ private extension ForgotPasswordView { } footer: { if viewModel.isEmailBlank { Text(String.emailIsRequired) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } else if viewModel.isEmailInvalid { Text(String.emailIsInvalid) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } } diff --git a/NativeAppTemplate/UI/App Root/ResendConfirmationInstructionsView.swift b/NativeAppTemplate/UI/App Root/ResendConfirmationInstructionsView.swift index b5a14ce..aff34fb 100644 --- a/NativeAppTemplate/UI/App Root/ResendConfirmationInstructionsView.swift +++ b/NativeAppTemplate/UI/App Root/ResendConfirmationInstructionsView.swift @@ -53,10 +53,10 @@ private extension ResendConfirmationInstructionsView { } footer: { if viewModel.isEmailBlank { Text(String.emailIsRequired) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } else if viewModel.isEmailInvalid { Text(String.emailIsInvalid) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } } diff --git a/NativeAppTemplate/UI/App Root/SignInEmailAndPasswordView.swift b/NativeAppTemplate/UI/App Root/SignInEmailAndPasswordView.swift index 58292a3..572b093 100644 --- a/NativeAppTemplate/UI/App Root/SignInEmailAndPasswordView.swift +++ b/NativeAppTemplate/UI/App Root/SignInEmailAndPasswordView.swift @@ -49,10 +49,10 @@ private extension SignInEmailAndPasswordView { } footer: { if viewModel.isEmailBlank { Text(String.emailIsRequired) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } else if viewModel.isEmailInvalid { Text(String.emailIsInvalid) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } } Section { @@ -66,10 +66,10 @@ private extension SignInEmailAndPasswordView { } footer: { if viewModel.isPasswordBlank { Text(String.passwordIsRequired) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } else if viewModel.hasInvalidDataPassword { Text(String.passwordIsInvalid) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } } diff --git a/NativeAppTemplate/UI/App Root/SignUpView.swift b/NativeAppTemplate/UI/App Root/SignUpView.swift index c6df4fe..97c667a 100644 --- a/NativeAppTemplate/UI/App Root/SignUpView.swift +++ b/NativeAppTemplate/UI/App Root/SignUpView.swift @@ -50,7 +50,7 @@ private extension SignUpView { } footer: { Text(String.fullNameIsRequired) .font(.caption) - .foregroundStyle(viewModel.isNameBlank ? .red : .clear) + .foregroundStyle(viewModel.isNameBlank ? .validationError : .clear) } Section { @@ -62,10 +62,10 @@ private extension SignUpView { } footer: { if viewModel.isEmailBlank { Text(String.emailIsRequired) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } else if viewModel.hasInvalidDataEmail { Text(String.emailIsInvalid) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } } @@ -88,10 +88,10 @@ private extension SignUpView { if viewModel.isPasswordBlank { Text(String.passwordIsRequired) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } else if viewModel.hasInvalidDataPassword { Text(String.passwordIsInvalid) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } } } diff --git a/NativeAppTemplate/UI/Scan/CompleteScanResultView.swift b/NativeAppTemplate/UI/Scan/CompleteScanResultView.swift index 70aacac..87ab9e5 100644 --- a/NativeAppTemplate/UI/Scan/CompleteScanResultView.swift +++ b/NativeAppTemplate/UI/Scan/CompleteScanResultView.swift @@ -67,6 +67,7 @@ private extension CompleteScanResultView { GroupBox(label: Label(String("Error"), systemImage: "exclamationmark.triangle")) { Text(completeScanResult.message) } + .foregroundStyle(.validationError) .backgroundStyle(.failureBackground) } diff --git a/NativeAppTemplate/UI/Scan/ScanView.swift b/NativeAppTemplate/UI/Scan/ScanView.swift index 5f0cd0d..dee136a 100644 --- a/NativeAppTemplate/UI/Scan/ScanView.swift +++ b/NativeAppTemplate/UI/Scan/ScanView.swift @@ -137,7 +137,7 @@ private extension ScanView { .pickerStyle(SegmentedPickerStyle()) } } - .toolbarBackground(.black, for: .navigationBar) + .toolbarBackground(.backgroundColor, for: .navigationBar) .toolbarBackground(.visible, for: .navigationBar) .padding() .confirmationDialog( diff --git a/NativeAppTemplate/UI/Scan/ShowTagInfoScanResultView.swift b/NativeAppTemplate/UI/Scan/ShowTagInfoScanResultView.swift index e917fc1..d6888c1 100644 --- a/NativeAppTemplate/UI/Scan/ShowTagInfoScanResultView.swift +++ b/NativeAppTemplate/UI/Scan/ShowTagInfoScanResultView.swift @@ -46,14 +46,14 @@ private extension ShowTagInfoScanResultView { Text(String(itemTag.queueNumber)) .font(.uiTitle1) - .foregroundStyle(itemTagType == .server ? .red : .blue) + .foregroundStyle(itemTagType == .server ? .serverForeground : .accent) HStack(alignment: .firstTextBaseline) { Text(String(scannedAt.cardTimeAgoInWordsDateString)) .font(.uiBodyCustom) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) Text(verbatim: "show tag info scanned") .font(.uiFootnote) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) } Grid( @@ -64,28 +64,28 @@ private extension ShowTagInfoScanResultView { GridRow { Image(systemName: "storefront") .frame(width: imageSize, height: imageSize) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) Text(itemTag.shopName) .font(.uiLabelBold) Text(" ") .font(.uiFootnote) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) } GridRow { Image(systemName: "info.circle") .frame(width: imageSize, height: imageSize) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) Text(itemTagType.displayString) .font(.uiLabelBold) - .foregroundStyle(itemTagType == .server ? .red : .blue) + .foregroundStyle(itemTagType == .server ? .serverForeground : .accent) Text(verbatim: "tag type") .font(.uiFootnote) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) } GridRow { Image(systemName: "flag.checkered") .frame(width: imageSize, height: imageSize) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) if itemTag.state == .completed { CompletedTag() } else { @@ -93,19 +93,19 @@ private extension ShowTagInfoScanResultView { } Text(verbatim: "tag status") .font(.uiFootnote) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) } if itemTag.scanState == ScanState.scanned, itemTag.customerReadAt != nil { GridRow { Image(systemName: "person.2") .frame(width: imageSize, height: imageSize) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) Text(itemTag.customerReadAt!.cardTimeString) .font(.uiLabelBold) Text(verbatim: "scanned by a customer") .font(.uiFootnote) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) } } @@ -113,40 +113,40 @@ private extension ShowTagInfoScanResultView { GridRow { Image(systemName: "flag.checkered.circle") .frame(width: imageSize, height: imageSize) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) Text(itemTag.completedAt!.cardTimeString) .font(.uiLabelBold) Text(verbatim: "completed") .font(.uiFootnote) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) } } GridRow { Image(systemName: "rectangle") .frame(width: imageSize, height: imageSize) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) Text(displayReadOnly) .font(.uiLabelBold) Text(verbatim: "NFC tag") .font(.uiFootnote) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) } GridRow { Image(systemName: "clock") .frame(width: imageSize, height: imageSize) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) Text(itemTag.createdAt.cardDateString) .font(.uiLabelBold) Text(verbatim: "created") .font(.uiFootnote) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.secondaryText) } } } } } - .foregroundStyle(.coloredSecondaryForeground) + .foregroundStyle(.contentText) .backgroundStyle(.coloredSecondaryBackground) .dynamicTypeSize(...DynamicTypeSize.accessibility1) } @@ -161,7 +161,7 @@ private extension ShowTagInfoScanResultView { var idledView: some View { GroupBox(label: Label(String.tagInfo, systemImage: "rectangle")) {} - .foregroundStyle(.coloredSecondaryForeground) + .foregroundStyle(.contentText) .backgroundStyle(.coloredSecondaryBackground) } } diff --git a/NativeAppTemplate/UI/Settings/PasswordEditView.swift b/NativeAppTemplate/UI/Settings/PasswordEditView.swift index 172080c..c912673 100644 --- a/NativeAppTemplate/UI/Settings/PasswordEditView.swift +++ b/NativeAppTemplate/UI/Settings/PasswordEditView.swift @@ -52,7 +52,7 @@ private extension PasswordEditView { Text(String.weNeedYourCurrentPassword) .font(.uiFootnote) Text(String.currentPasswordIsRequired) - .foregroundStyle(Utility.isBlank(viewModel.currentPassword) ? .red : .clear) + .foregroundStyle(Utility.isBlank(viewModel.currentPassword) ? .validationError : .clear) .font(.uiFootnote) } } @@ -70,11 +70,11 @@ private extension PasswordEditView { if Utility.isBlank(viewModel.password) { Text(String.newPasswordIsRequired) - .foregroundStyle(.red) + .foregroundStyle(.validationError) .font(.uiFootnote) } else if viewModel.hasInvalidDataPassword { Text(String.passwordIsInvalid) - .foregroundStyle(.red) + .foregroundStyle(.validationError) .font(.uiFootnote) } } @@ -89,7 +89,7 @@ private extension PasswordEditView { } footer: { Text(String.confirmNewPasswordIsRequired) .font(.uiFootnote) - .foregroundStyle(Utility.isBlank(viewModel.passwordConfirmation) ? .red : .clear) + .foregroundStyle(Utility.isBlank(viewModel.passwordConfirmation) ? .validationError : .clear) } } .navigationTitle(String.updatePassword) diff --git a/NativeAppTemplate/UI/Settings/ShopkeeperEditView.swift b/NativeAppTemplate/UI/Settings/ShopkeeperEditView.swift index f522fb1..de96b77 100644 --- a/NativeAppTemplate/UI/Settings/ShopkeeperEditView.swift +++ b/NativeAppTemplate/UI/Settings/ShopkeeperEditView.swift @@ -47,7 +47,7 @@ private extension ShopkeeperEditView { Text(String.fullName) } footer: { Text(String.fullNameIsRequired) - .foregroundStyle(Utility.isBlank(viewModel.name) ? .red : .clear) + .foregroundStyle(Utility.isBlank(viewModel.name) ? .validationError : .clear) } Section { @@ -59,10 +59,10 @@ private extension ShopkeeperEditView { } footer: { if Utility.isBlank(viewModel.email) { Text(String.emailIsRequired) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } else if viewModel.hasInvalidDataEmail { Text(String.emailIsInvalid) - .foregroundStyle(.red) + .foregroundStyle(.validationError) } } diff --git a/NativeAppTemplate/UI/Shared/MainButtonView.swift b/NativeAppTemplate/UI/Shared/MainButtonView.swift index 8a633fe..3e986ac 100644 --- a/NativeAppTemplate/UI/Shared/MainButtonView.swift +++ b/NativeAppTemplate/UI/Shared/MainButtonView.swift @@ -91,7 +91,7 @@ struct MainButtonView: View { .frame(width: height, height: height) .foregroundStyle(type.color) .background( - Color.white + Color.arrowBackground .cornerRadius(NativeAppTemplateConstants.CornerRadius.sm) .padding(NativeAppTemplateConstants.Spacing.xs) ) @@ -150,7 +150,7 @@ struct MainButtonImageView: View { .frame(width: height, height: height) .foregroundStyle(type.color) .background( - Color.white + Color.arrowBackground .cornerRadius(NativeAppTemplateConstants.CornerRadius.sm) .padding(NativeAppTemplateConstants.Spacing.xs) ) diff --git a/NativeAppTemplate/UI/Shared/Tags/TagView.swift b/NativeAppTemplate/UI/Shared/Tags/TagView.swift index b5a2128..1164580 100644 --- a/NativeAppTemplate/UI/Shared/Tags/TagView.swift +++ b/NativeAppTemplate/UI/Shared/Tags/TagView.swift @@ -57,16 +57,16 @@ struct TagView_Previews: PreviewProvider { VStack(spacing: 18) { TagView( text: "this is a tag", - textColor: .white, - backgroundColor: .red, - borderColor: .yellow + textColor: .coolGrey10, + backgroundColor: .red5, + borderColor: .yellow5 ) TagView( text: "with an image", - textColor: .white, - backgroundColor: .red, - borderColor: .yellow, + textColor: .coolGrey10, + backgroundColor: .red5, + borderColor: .yellow5, image: Image(systemName: "checkmark") ) } diff --git a/NativeAppTemplate/UI/Shop Detail/ShopDetailView.swift b/NativeAppTemplate/UI/Shop Detail/ShopDetailView.swift index 5cd132d..a3b1cec 100644 --- a/NativeAppTemplate/UI/Shop Detail/ShopDetailView.swift +++ b/NativeAppTemplate/UI/Shop Detail/ShopDetailView.swift @@ -122,7 +122,7 @@ private extension ShopDetailView { Label(String.reset, systemImage: "trash") .labelStyle(.titleOnly) } - .tint(.red) + .tint(.validationError) } } .listRowBackground(Color.cardBackground) diff --git a/NativeAppTemplate/UI/Shop List/ShopCreateView.swift b/NativeAppTemplate/UI/Shop List/ShopCreateView.swift index 90f25a2..970a6a1 100644 --- a/NativeAppTemplate/UI/Shop List/ShopCreateView.swift +++ b/NativeAppTemplate/UI/Shop List/ShopCreateView.swift @@ -38,7 +38,7 @@ struct ShopCreateView: View { TextField(String.name, text: $viewModel.name) } footer: { Text(String.shopNameIsRequired) - .foregroundStyle(viewModel.hasInvalidData ? .red : .clear) + .foregroundStyle(viewModel.hasInvalidData ? .validationError : .clear) } Section { diff --git a/NativeAppTemplate/UI/Shop Settings/ItemTag Detail/ItemTagEditView.swift b/NativeAppTemplate/UI/Shop Settings/ItemTag Detail/ItemTagEditView.swift index 2b597dc..165a7b9 100644 --- a/NativeAppTemplate/UI/Shop Settings/ItemTag Detail/ItemTagEditView.swift +++ b/NativeAppTemplate/UI/Shop Settings/ItemTag Detail/ItemTagEditView.swift @@ -60,7 +60,7 @@ private extension ItemTagEditView { .font(.uiFootnote) Text(String.tagNumberIsInvalid) .font(.uiFootnote) - .foregroundStyle(viewModel.hasInvalidDataQueueNumber ? .red : .clear) + .foregroundStyle(viewModel.hasInvalidDataQueueNumber ? .validationError : .clear) } } } diff --git a/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagCreateView.swift b/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagCreateView.swift index cba604f..8f45a18 100644 --- a/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagCreateView.swift +++ b/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagCreateView.swift @@ -57,7 +57,7 @@ private extension ItemTagCreateView { .font(.uiFootnote) Text(String.tagNumberIsInvalid) .font(.uiFootnote) - .foregroundStyle(viewModel.hasInvalidDataQueueNumber ? .red : .clear) + .foregroundStyle(viewModel.hasInvalidDataQueueNumber ? .validationError : .clear) } } } diff --git a/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagListView.swift b/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagListView.swift index efe5e78..68be03b 100644 --- a/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagListView.swift +++ b/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagListView.swift @@ -69,7 +69,7 @@ private extension ItemTagListView { Label(String.delete, systemImage: "trash") .labelStyle(.titleOnly) } - .tint(.red) + .tint(.validationError) } } .listRowBackground(Color.cardBackground) diff --git a/NativeAppTemplate/UI/Shop Settings/ShopBasicSettingsView.swift b/NativeAppTemplate/UI/Shop Settings/ShopBasicSettingsView.swift index 6467d2c..5551d09 100644 --- a/NativeAppTemplate/UI/Shop Settings/ShopBasicSettingsView.swift +++ b/NativeAppTemplate/UI/Shop Settings/ShopBasicSettingsView.swift @@ -50,7 +50,7 @@ private extension ShopBasicSettingsView { } footer: { Text(String.shopNameIsRequired) .font(.uiFootnote) - .foregroundStyle(Utility.isBlank(viewModel.name) ? .red : .clear) + .foregroundStyle(Utility.isBlank(viewModel.name) ? .validationError : .clear) } Section { diff --git a/NativeAppTemplate/Utilities/QRCodeGenerator.swift b/NativeAppTemplate/Utilities/QRCodeGenerator.swift index 1f1db5e..fc852de 100644 --- a/NativeAppTemplate/Utilities/QRCodeGenerator.swift +++ b/NativeAppTemplate/Utilities/QRCodeGenerator.swift @@ -35,7 +35,7 @@ struct QRCodeGenerator { if let centerImage = centerText.image( withAttributes: [ .font: UIFont.systemFont(ofSize: 40.0), - .backgroundColor: UIColor.white + .backgroundColor: UIColor(Color.arrowBackground) ] ) { generate(inputText: inputText, scale: scale, centerImage: centerImage) diff --git a/NativeAppTemplateTests/Utilities/UtilityTest.swift b/NativeAppTemplateTests/Utilities/UtilityTest.swift index 61e123f..3871449 100644 --- a/NativeAppTemplateTests/Utilities/UtilityTest.swift +++ b/NativeAppTemplateTests/Utilities/UtilityTest.swift @@ -49,5 +49,4 @@ struct UtilityTest { func validateEmail(email: String, expected: Bool) { #expect(Utility.validateEmail(email) == expected) } - } From cd4214acf91f4112a850c219dea82f598d323c58 Mon Sep 17 00:00:00 2001 From: dadachi Date: Tue, 31 Mar 2026 09:37:52 +0900 Subject: [PATCH 02/10] Add GlassButtonStyle and GlassCard components Co-Authored-By: Claude Opus 4.6 (1M context) --- .../UI/Shared/GlassButtonStyle.swift | 52 +++++++++++++++++++ NativeAppTemplate/UI/Shared/GlassCard.swift | 42 +++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 NativeAppTemplate/UI/Shared/GlassButtonStyle.swift create mode 100644 NativeAppTemplate/UI/Shared/GlassCard.swift diff --git a/NativeAppTemplate/UI/Shared/GlassButtonStyle.swift b/NativeAppTemplate/UI/Shared/GlassButtonStyle.swift new file mode 100644 index 0000000..2cae40b --- /dev/null +++ b/NativeAppTemplate/UI/Shared/GlassButtonStyle.swift @@ -0,0 +1,52 @@ +// +// GlassButtonStyle.swift +// NativeAppTemplate +// +// Created by Daisuke Adachi. +// + +import SwiftUI + +struct PrimaryGlassButtonStyle: ButtonStyle { + func makeBody(configuration: Configuration) -> some View { + configuration.label + .font(.uiButtonLabelLarge) + .foregroundStyle(.glassForeground) + .padding(.vertical, NativeAppTemplateConstants.Spacing.sm) + .padding(.horizontal, NativeAppTemplateConstants.Spacing.md) + .frame(maxWidth: .infinity) + .background( + LinearGradient( + colors: [Color.accent, Color.accent.opacity(0.8)], + startPoint: .topLeading, + endPoint: .bottomTrailing + ) + ) + .clipShape(RoundedRectangle(cornerRadius: NativeAppTemplateConstants.CornerRadius.sm)) + .shadow( + color: Color.accent.opacity(NativeAppTemplateConstants.Glass.shadowOpacity), + radius: NativeAppTemplateConstants.Layout.shadowRadius + ) + .scaleEffect(configuration.isPressed ? 0.97 : 1.0) + .animation(.easeInOut(duration: NativeAppTemplateConstants.Animation.fast), value: configuration.isPressed) + } +} + +struct SecondaryGlassButtonStyle: ButtonStyle { + func makeBody(configuration: Configuration) -> some View { + configuration.label + .font(.uiButtonLabelLarge) + .foregroundStyle(.accent) + .padding(.vertical, NativeAppTemplateConstants.Spacing.sm) + .padding(.horizontal, NativeAppTemplateConstants.Spacing.md) + .frame(maxWidth: .infinity) + .background(.ultraThinMaterial) + .clipShape(RoundedRectangle(cornerRadius: NativeAppTemplateConstants.CornerRadius.sm)) + .overlay( + RoundedRectangle(cornerRadius: NativeAppTemplateConstants.CornerRadius.sm) + .stroke(Color.accent, lineWidth: NativeAppTemplateConstants.Layout.borderWidth) + ) + .scaleEffect(configuration.isPressed ? 0.97 : 1.0) + .animation(.easeInOut(duration: NativeAppTemplateConstants.Animation.fast), value: configuration.isPressed) + } +} diff --git a/NativeAppTemplate/UI/Shared/GlassCard.swift b/NativeAppTemplate/UI/Shared/GlassCard.swift new file mode 100644 index 0000000..e41d44e --- /dev/null +++ b/NativeAppTemplate/UI/Shared/GlassCard.swift @@ -0,0 +1,42 @@ +// +// GlassCard.swift +// NativeAppTemplate +// +// Created by Daisuke Adachi. +// + +import SwiftUI + +struct GlassCard: View { + var cornerRadius: CGFloat + var padding: CGFloat + @ViewBuilder var content: Content + + init( + cornerRadius: CGFloat = NativeAppTemplateConstants.CornerRadius.lg, + padding: CGFloat = NativeAppTemplateConstants.Spacing.md, + @ViewBuilder content: () -> Content + ) { + self.cornerRadius = cornerRadius + self.padding = padding + self.content = content() + } + + var body: some View { + content + .padding(padding) + .background(.ultraThinMaterial) + .clipShape(RoundedRectangle(cornerRadius: cornerRadius)) + .overlay( + RoundedRectangle(cornerRadius: cornerRadius) + .stroke( + Color.glassBorder.opacity(NativeAppTemplateConstants.Glass.borderOpacity), + lineWidth: NativeAppTemplateConstants.Layout.borderWidth + ) + ) + .shadow( + color: .glassShadow.opacity(NativeAppTemplateConstants.Glass.shadowOpacity), + radius: NativeAppTemplateConstants.Layout.shadowRadius + ) + } +} From 70dc6f3d2c8b7782970deb74048c03e33bc9f455 Mon Sep 17 00:00:00 2001 From: dadachi Date: Tue, 31 Mar 2026 09:41:39 +0900 Subject: [PATCH 03/10] Apply GlassCard to empty state views Wrap ErrorView, LoadingView, NeedAppUpdatesView, and OfflineView content with GlassCard for consistent glassmorphism styling. Co-Authored-By: Claude Opus 4.6 (1M context) --- NativeAppTemplate.xcodeproj/project.pbxproj | 8 +++ .../UI/Empty States/ErrorView.swift | 56 ++++++++++--------- .../UI/Empty States/LoadingView.swift | 12 ++-- .../UI/Empty States/NeedAppUpdatesView.swift | 47 +++++++++------- .../UI/Empty States/OfflineView.swift | 46 ++++++++------- 5 files changed, 97 insertions(+), 72 deletions(-) diff --git a/NativeAppTemplate.xcodeproj/project.pbxproj b/NativeAppTemplate.xcodeproj/project.pbxproj index 1c1239d..71c5331 100644 --- a/NativeAppTemplate.xcodeproj/project.pbxproj +++ b/NativeAppTemplate.xcodeproj/project.pbxproj @@ -159,6 +159,8 @@ 01E0A5B725BD0FCD00298D35 /* OfflineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01E0A5B225BD0FC700298D35 /* OfflineView.swift */; }; 01E0A5B825BD0FCD00298D35 /* ErrorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01E0A5B325BD0FC700298D35 /* ErrorView.swift */; }; 01E0A60125BD149200298D35 /* MainButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01E0A5F925BD148800298D35 /* MainButtonView.swift */; }; + A1B2C3D401000001 /* GlassButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1B2C3D401000002 /* GlassButtonStyle.swift */; }; + A1B2C3D401000003 /* GlassCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1B2C3D401000004 /* GlassCard.swift */; }; 01E0A60C25BD440300298D35 /* SignInEmailAndPasswordView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01E0A60B25BD440300298D35 /* SignInEmailAndPasswordView.swift */; }; 01E0A63025BD53FD00298D35 /* Shop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01E0A62F25BD53FD00298D35 /* Shop.swift */; }; 01E1CECC287787A700E724FC /* SignUpView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01E1CECB287787A700E724FC /* SignUpView.swift */; }; @@ -335,6 +337,8 @@ 01E0A5B325BD0FC700298D35 /* ErrorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorView.swift; sourceTree = ""; }; 01E0A5B525BD0FC700298D35 /* LoadingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingView.swift; sourceTree = ""; }; 01E0A5F925BD148800298D35 /* MainButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainButtonView.swift; sourceTree = ""; }; + A1B2C3D401000002 /* GlassButtonStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlassButtonStyle.swift; sourceTree = ""; }; + A1B2C3D401000004 /* GlassCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlassCard.swift; sourceTree = ""; }; 01E0A60B25BD440300298D35 /* SignInEmailAndPasswordView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInEmailAndPasswordView.swift; sourceTree = ""; }; 01E0A62F25BD53FD00298D35 /* Shop.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Shop.swift; sourceTree = ""; }; 01E1CECB287787A700E724FC /* SignUpView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignUpView.swift; sourceTree = ""; }; @@ -844,6 +848,8 @@ isa = PBXGroup; children = ( 0172788A2D7D936E00CE424F /* Tags */, + A1B2C3D401000002 /* GlassButtonStyle.swift */, + A1B2C3D401000004 /* GlassCard.swift */, 01E0A5F925BD148800298D35 /* MainButtonView.swift */, ); path = Shared; @@ -1031,6 +1037,8 @@ 017278832D7D935700CE424F /* ImageSaver.swift in Sources */, 01D8AE8B2AB453C1009AFFBA /* ShopBasicSettingsView.swift in Sources */, 01E0A60125BD149200298D35 /* MainButtonView.swift in Sources */, + A1B2C3D401000001 /* GlassButtonStyle.swift in Sources */, + A1B2C3D401000003 /* GlassCard.swift in Sources */, 0182D39A25B4424B001E881D /* LoggedInShopkeeperKeychainStore.swift in Sources */, 01ED197B2A037B9E00CD4735 /* AppTabView.swift in Sources */, 0110A1612AC81978003EDCBA /* ResendConfirmationInstructionsView.swift in Sources */, diff --git a/NativeAppTemplate/UI/Empty States/ErrorView.swift b/NativeAppTemplate/UI/Empty States/ErrorView.swift index 131b9af..57363a3 100644 --- a/NativeAppTemplate/UI/Empty States/ErrorView.swift +++ b/NativeAppTemplate/UI/Empty States/ErrorView.swift @@ -28,38 +28,40 @@ struct ErrorView { extension ErrorView: View { var body: some View { - ZStack { - VStack { - Spacer() + VStack { + Spacer() - Image(systemName: "exclamationmark.triangle") - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: NativeAppTemplateConstants.Spacing.xxxl) - .padding() - .foregroundStyle(.titleText) + GlassCard { + VStack { + Image(systemName: "exclamationmark.triangle") + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: NativeAppTemplateConstants.Spacing.xxxl) + .padding() + .foregroundStyle(.titleText) - Text(titleText) - .font(.uiTitle1) - .foregroundStyle(.titleText) - .padding(.top) + Text(titleText) + .font(.uiTitle1) + .foregroundStyle(.titleText) + .padding(.top) - Text(bodyText) - .font(.uiLabel) - .foregroundStyle(.contentText) - .multilineTextAlignment(.center) - .padding(.top, NativeAppTemplateConstants.Spacing.xxxs) + Text(bodyText) + .font(.uiLabel) + .foregroundStyle(.contentText) + .multilineTextAlignment(.center) + .padding(.top, NativeAppTemplateConstants.Spacing.xxxs) - MainButtonView( - title: buttonTitle, - type: .primary(withArrow: false), - callback: buttonAction - ) - .padding(NativeAppTemplateConstants.Spacing.lg) - - Spacer() + MainButtonView( + title: buttonTitle, + type: .primary(withArrow: false), + callback: buttonAction + ) + .padding(.top, NativeAppTemplateConstants.Spacing.lg) + } } - .background(Color.backgroundColor) + .padding(.horizontal, NativeAppTemplateConstants.Spacing.lg) + + Spacer() } } } diff --git a/NativeAppTemplate/UI/Empty States/LoadingView.swift b/NativeAppTemplate/UI/Empty States/LoadingView.swift index 324eff9..1714bb4 100644 --- a/NativeAppTemplate/UI/Empty States/LoadingView.swift +++ b/NativeAppTemplate/UI/Empty States/LoadingView.swift @@ -7,11 +7,13 @@ import SwiftUI struct LoadingView: View { var body: some View { - VStack { - ProgressView().scaleEffect(1.0, anchor: .center) - .padding([.bottom], NativeAppTemplateConstants.Spacing.xs) - Text(String.loading) - .font(.uiHeadline) + GlassCard(padding: NativeAppTemplateConstants.Spacing.lg) { + VStack { + ProgressView().scaleEffect(1.0, anchor: .center) + .padding([.bottom], NativeAppTemplateConstants.Spacing.xs) + Text(String.loading) + .font(.uiHeadline) + } } } } diff --git a/NativeAppTemplate/UI/Empty States/NeedAppUpdatesView.swift b/NativeAppTemplate/UI/Empty States/NeedAppUpdatesView.swift index fff7670..33ebfd1 100644 --- a/NativeAppTemplate/UI/Empty States/NeedAppUpdatesView.swift +++ b/NativeAppTemplate/UI/Empty States/NeedAppUpdatesView.swift @@ -10,29 +10,36 @@ struct NeedAppUpdatesView: View { var body: some View { VStack { - Image(systemName: "exclamationmark.arrow.circlepath") - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: NativeAppTemplateConstants.Spacing.xxxl) - .foregroundStyle(.titleText) - .padding() - Text(String.updateApp) - .font(.uiTitle1) - .foregroundStyle(.titleText) - .padding(.top) - Text(String.installNewVersionApp) - .foregroundStyle(.contentText) - .padding(.top, NativeAppTemplateConstants.Spacing.xxxs) - Button { - openURL(URL(string: String.appStoreUrl)!) - } label: { - Text(String.updateApp) + Spacer() + + GlassCard { + VStack { + Image(systemName: "exclamationmark.arrow.circlepath") + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: NativeAppTemplateConstants.Spacing.xxxl) + .foregroundStyle(.titleText) + .padding() + Text(String.updateApp) + .font(.uiTitle1) + .foregroundStyle(.titleText) + .padding(.top) + Text(String.installNewVersionApp) + .foregroundStyle(.contentText) + .padding(.top, NativeAppTemplateConstants.Spacing.xxxs) + Button { + openURL(URL(string: String.appStoreUrl)!) + } label: { + Text(String.updateApp) + } + .padding(.top) + } } - .padding(.top) + .padding(.horizontal, NativeAppTemplateConstants.Spacing.lg) + + Spacer() } .frame(maxWidth: .infinity, maxHeight: .infinity) - .background(Color.backgroundColor) - .edgesIgnoringSafeArea(.all) } } diff --git a/NativeAppTemplate/UI/Empty States/OfflineView.swift b/NativeAppTemplate/UI/Empty States/OfflineView.swift index 9afb6d1..203c955 100644 --- a/NativeAppTemplate/UI/Empty States/OfflineView.swift +++ b/NativeAppTemplate/UI/Empty States/OfflineView.swift @@ -8,30 +8,36 @@ import SwiftUI struct OfflineView: View { var body: some View { VStack { - Image(systemName: "wifi.slash") - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: NativeAppTemplateConstants.Spacing.xxxl) - .padding() - .foregroundStyle(.titleText) + Spacer() - Text(String.noConnection) - .font(.uiTitle1) - .foregroundStyle(.titleText) - .multilineTextAlignment(.center) - .padding(.top) + GlassCard { + VStack { + Image(systemName: "wifi.slash") + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: NativeAppTemplateConstants.Spacing.xxxl) + .padding() + .foregroundStyle(.titleText) - Text(String.checkInternetConnection) - .font(.uiLabel) - .lineSpacing(NativeAppTemplateConstants.Spacing.xxs) - .foregroundStyle(.contentText) - .multilineTextAlignment(.center) - .padding(.top, NativeAppTemplateConstants.Spacing.xxxs) - .padding(.horizontal, NativeAppTemplateConstants.Spacing.lg) + Text(String.noConnection) + .font(.uiTitle1) + .foregroundStyle(.titleText) + .multilineTextAlignment(.center) + .padding(.top) + + Text(String.checkInternetConnection) + .font(.uiLabel) + .lineSpacing(NativeAppTemplateConstants.Spacing.xxs) + .foregroundStyle(.contentText) + .multilineTextAlignment(.center) + .padding(.top, NativeAppTemplateConstants.Spacing.xxxs) + } + } + .padding(.horizontal, NativeAppTemplateConstants.Spacing.lg) + + Spacer() } .frame(maxWidth: .infinity, maxHeight: .infinity) - .background(Color.backgroundColor) - .edgesIgnoringSafeArea(.all) } } From 84a6f0e1e8de8b1d07fecb8bfce6e9fa5a003b41 Mon Sep 17 00:00:00 2001 From: dadachi Date: Tue, 31 Mar 2026 09:46:24 +0900 Subject: [PATCH 04/10] Update SnackbarView with glassmorphism styling Replace solid background and rectangle overlays with ultraThinMaterial, rounded corners, glass border, and shadow. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../UI/App Root/SnackbarView.swift | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/NativeAppTemplate/UI/App Root/SnackbarView.swift b/NativeAppTemplate/UI/App Root/SnackbarView.swift index c3c780c..ff04a7c 100644 --- a/NativeAppTemplate/UI/App Root/SnackbarView.swift +++ b/NativeAppTemplate/UI/App Root/SnackbarView.swift @@ -55,15 +55,20 @@ struct SnackbarView: View { } .padding(.vertical, NativeAppTemplateConstants.Spacing.sm) .padding(.horizontal, NativeAppTemplateConstants.Spacing.md) - .background(state.status.color) + .background(.ultraThinMaterial) + .clipShape(RoundedRectangle(cornerRadius: NativeAppTemplateConstants.CornerRadius.md)) .overlay( - Rectangle().frame(width: nil, height: 1, alignment: .top).foregroundColor(.lightestAccent), - alignment: .top + RoundedRectangle(cornerRadius: NativeAppTemplateConstants.CornerRadius.md) + .stroke( + Color.glassBorder.opacity(NativeAppTemplateConstants.Glass.borderOpacity), + lineWidth: NativeAppTemplateConstants.Layout.borderWidth + ) ) - .overlay( - Rectangle().frame(width: nil, height: 1, alignment: .bottom).foregroundColor(.lightestAccent), - alignment: .bottom + .shadow( + color: .glassShadow.opacity(NativeAppTemplateConstants.Glass.shadowOpacity), + radius: NativeAppTemplateConstants.Layout.shadowRadius ) + .padding(.horizontal, NativeAppTemplateConstants.Spacing.xxs) } } From 0d4586812cebcb4c0b85f4711b28fdfa8cf27761 Mon Sep 17 00:00:00 2001 From: dadachi Date: Tue, 31 Mar 2026 10:02:15 +0900 Subject: [PATCH 05/10] Update scan views to use ultraThinMaterial backgrounds Replace solid colored backgrounds with ultraThinMaterial in ScanView, CompleteScanResultView, and ShowTagInfoScanResultView. Use semantic colors for foreground styles and add validationError to failed views. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../UI/Scan/CompleteScanResultView.swift | 7 ++++--- NativeAppTemplate/UI/Scan/ScanView.swift | 12 ++++++------ .../UI/Scan/ShowTagInfoScanResultView.swift | 9 +++++---- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/NativeAppTemplate/UI/Scan/CompleteScanResultView.swift b/NativeAppTemplate/UI/Scan/CompleteScanResultView.swift index 87ab9e5..e8e5986 100644 --- a/NativeAppTemplate/UI/Scan/CompleteScanResultView.swift +++ b/NativeAppTemplate/UI/Scan/CompleteScanResultView.swift @@ -59,20 +59,21 @@ private extension CompleteScanResultView { } .padding(.top, NativeAppTemplateConstants.Spacing.xxs) } - .backgroundStyle(.successBackground) + .backgroundStyle(.ultraThinMaterial) } } var failedView: some View { GroupBox(label: Label(String("Error"), systemImage: "exclamationmark.triangle")) { Text(completeScanResult.message) + .padding(.top, NativeAppTemplateConstants.Spacing.xxs) } .foregroundStyle(.validationError) - .backgroundStyle(.failureBackground) + .backgroundStyle(.ultraThinMaterial) } var idledView: some View { GroupBox(label: Label(String("Result"), systemImage: "checkmark.circle")) {} - .backgroundStyle(.successBackground) + .backgroundStyle(.ultraThinMaterial) } } diff --git a/NativeAppTemplate/UI/Scan/ScanView.swift b/NativeAppTemplate/UI/Scan/ScanView.swift index dee136a..b348003 100644 --- a/NativeAppTemplate/UI/Scan/ScanView.swift +++ b/NativeAppTemplate/UI/Scan/ScanView.swift @@ -97,10 +97,10 @@ private extension ScanView { Text(String.completeScanHelp) .font(.uiFootnote) - .foregroundStyle(.coloredPrimaryFootnoteText) + .foregroundStyle(.contentText) } - .foregroundStyle(.coloredPrimaryForeground) - .backgroundStyle(.coloredPrimaryBackground) + .foregroundStyle(.accent) + .backgroundStyle(.ultraThinMaterial) } CompleteScanResultView( @@ -115,10 +115,10 @@ private extension ScanView { Text(String.showTagInfoScanHelp) .font(.uiFootnote) - .foregroundStyle(.coloredSecondaryFootnoteText) + .foregroundStyle(.contentText) } - .foregroundStyle(.coloredSecondaryForeground) - .backgroundStyle(.coloredSecondaryBackground) + .foregroundStyle(.contentText) + .backgroundStyle(.ultraThinMaterial) ShowTagInfoScanResultView( showTagInfoScanResult: sessionController.showTagInfoScanResult diff --git a/NativeAppTemplate/UI/Scan/ShowTagInfoScanResultView.swift b/NativeAppTemplate/UI/Scan/ShowTagInfoScanResultView.swift index d6888c1..6d0ce64 100644 --- a/NativeAppTemplate/UI/Scan/ShowTagInfoScanResultView.swift +++ b/NativeAppTemplate/UI/Scan/ShowTagInfoScanResultView.swift @@ -147,21 +147,22 @@ private extension ShowTagInfoScanResultView { } } .foregroundStyle(.contentText) - .backgroundStyle(.coloredSecondaryBackground) + .backgroundStyle(.ultraThinMaterial) .dynamicTypeSize(...DynamicTypeSize.accessibility1) } var failedView: some View { GroupBox(label: Label(String("Error"), systemImage: "exclamationmark.triangle")) { Text(showTagInfoScanResult.message) - .padding(.top) + .padding(.top, NativeAppTemplateConstants.Spacing.xxs) } - .backgroundStyle(.failureBackground) + .foregroundStyle(.validationError) + .backgroundStyle(.ultraThinMaterial) } var idledView: some View { GroupBox(label: Label(String.tagInfo, systemImage: "rectangle")) {} .foregroundStyle(.contentText) - .backgroundStyle(.coloredSecondaryBackground) + .backgroundStyle(.ultraThinMaterial) } } From acde7c293453a6adbbb8a85f6c2fb2ced498585a Mon Sep 17 00:00:00 2001 From: dadachi Date: Tue, 31 Mar 2026 10:03:08 +0900 Subject: [PATCH 06/10] Update ItemTagDetailView to use ultraThinMaterial backgrounds Replace lock, server, and customer GroupBox solid backgrounds with ultraThinMaterial for consistent glassmorphism styling. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../UI/Shop Settings/ItemTag Detail/ItemTagDetailView.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NativeAppTemplate/UI/Shop Settings/ItemTag Detail/ItemTagDetailView.swift b/NativeAppTemplate/UI/Shop Settings/ItemTag Detail/ItemTagDetailView.swift index 6d22444..1261a8e 100644 --- a/NativeAppTemplate/UI/Shop Settings/ItemTag Detail/ItemTagDetailView.swift +++ b/NativeAppTemplate/UI/Shop Settings/ItemTag Detail/ItemTagDetailView.swift @@ -79,7 +79,7 @@ private extension ItemTagDetailView { } } .foregroundStyle(.lockForeground) - .backgroundStyle(.lockBackground) + .backgroundStyle(.ultraThinMaterial) GroupBox(label: Label(String("Server"), systemImage: "storefront")) { MainButtonView(title: String.writeServerTag, type: .server(withArrow: false)) { @@ -88,7 +88,7 @@ private extension ItemTagDetailView { .padding() } .foregroundStyle(.serverForeground) - .backgroundStyle(.serverBackground) + .backgroundStyle(.ultraThinMaterial) GroupBox(label: Label(String("Customer"), systemImage: "person.2")) { MainButtonView(title: String.writeCustomerTag, type: .customer(withArrow: false)) { @@ -115,7 +115,7 @@ private extension ItemTagDetailView { } .padding(.top, NativeAppTemplateConstants.Spacing.md) .foregroundStyle(.customerForeground) - .backgroundStyle(.customerBackground) + .backgroundStyle(.ultraThinMaterial) } } .sheet( From 6761f7efe937ce3f747130b18af77e06264b389c Mon Sep 17 00:00:00 2001 From: dadachi Date: Tue, 31 Mar 2026 10:28:23 +0900 Subject: [PATCH 07/10] Use semi-transparent card background for list rows Apply Color.cardBackground.opacity(0.7) to listRowBackground across all list views for a translucent effect. Co-Authored-By: Claude Opus 4.6 (1M context) --- NativeAppTemplate/UI/Settings/SettingsView.swift | 4 ++-- NativeAppTemplate/UI/Shop Detail/ShopDetailView.swift | 2 +- NativeAppTemplate/UI/Shop List/ShopListView.swift | 2 +- .../UI/Shop Settings/ItemTag List/ItemTagListView.swift | 2 +- .../UI/Shop Settings/NumberTagsWebpageListView.swift | 2 +- NativeAppTemplate/UI/Shop Settings/ShopSettingsView.swift | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/NativeAppTemplate/UI/Settings/SettingsView.swift b/NativeAppTemplate/UI/Settings/SettingsView.swift index 68e40d8..361bf80 100644 --- a/NativeAppTemplate/UI/Settings/SettingsView.swift +++ b/NativeAppTemplate/UI/Settings/SettingsView.swift @@ -49,7 +49,7 @@ struct SettingsView: View { Label(String.password, systemImage: "key") } } - .listRowBackground(Color.cardBackground) + .listRowBackground(Color.cardBackground.opacity(0.7)) Section(header: Text(String.information)) { Link(destination: URL(string: String.supportWebsiteUrl)!) { @@ -86,7 +86,7 @@ struct SettingsView: View { Text(String.termsOfUse) } } - .listRowBackground(Color.cardBackground) + .listRowBackground(Color.cardBackground.opacity(0.7)) Section { VStack { diff --git a/NativeAppTemplate/UI/Shop Detail/ShopDetailView.swift b/NativeAppTemplate/UI/Shop Detail/ShopDetailView.swift index a3b1cec..7bbd3d0 100644 --- a/NativeAppTemplate/UI/Shop Detail/ShopDetailView.swift +++ b/NativeAppTemplate/UI/Shop Detail/ShopDetailView.swift @@ -125,7 +125,7 @@ private extension ShopDetailView { .tint(.validationError) } } - .listRowBackground(Color.cardBackground) + .listRowBackground(Color.cardBackground.opacity(0.7)) } } diff --git a/NativeAppTemplate/UI/Shop List/ShopListView.swift b/NativeAppTemplate/UI/Shop List/ShopListView.swift index 5f48c13..57f6979 100644 --- a/NativeAppTemplate/UI/Shop List/ShopListView.swift +++ b/NativeAppTemplate/UI/Shop List/ShopListView.swift @@ -80,7 +80,7 @@ private extension ShopListView { NavigationLink(value: shop) { ShopListCardView(shop: shop) } - .listRowBackground(Color.cardBackground) + .listRowBackground(Color.cardBackground.opacity(0.7)) } } diff --git a/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagListView.swift b/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagListView.swift index 68be03b..c601938 100644 --- a/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagListView.swift +++ b/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagListView.swift @@ -72,7 +72,7 @@ private extension ItemTagListView { .tint(.validationError) } } - .listRowBackground(Color.cardBackground) + .listRowBackground(Color.cardBackground.opacity(0.7)) } .refreshable { viewModel.reload() diff --git a/NativeAppTemplate/UI/Shop Settings/NumberTagsWebpageListView.swift b/NativeAppTemplate/UI/Shop Settings/NumberTagsWebpageListView.swift index 69905e5..6dc2a54 100644 --- a/NativeAppTemplate/UI/Shop Settings/NumberTagsWebpageListView.swift +++ b/NativeAppTemplate/UI/Shop Settings/NumberTagsWebpageListView.swift @@ -66,7 +66,7 @@ private extension NumberTagsWebpageListView { viewModel.copyWebpageUrl(viewModel.shop.displayShopServerUrl.absoluteString) } } - .listRowBackground(Color.cardBackground) + .listRowBackground(Color.cardBackground.opacity(0.7)) } } } diff --git a/NativeAppTemplate/UI/Shop Settings/ShopSettingsView.swift b/NativeAppTemplate/UI/Shop Settings/ShopSettingsView.swift index e77bb03..215b874 100644 --- a/NativeAppTemplate/UI/Shop Settings/ShopSettingsView.swift +++ b/NativeAppTemplate/UI/Shop Settings/ShopSettingsView.swift @@ -68,7 +68,7 @@ private extension ShopSettingsView { } label: { Label(String.shopSettingsBasicSettingsLabel, systemImage: "storefront") } - .listRowBackground(Color.cardBackground) + .listRowBackground(Color.cardBackground.opacity(0.7)) } Section { @@ -84,7 +84,7 @@ private extension ShopSettingsView { } label: { Label(String.shopSettingsManageNumberTagsLabel, systemImage: "rectangle.stack") } - .listRowBackground(Color.cardBackground) + .listRowBackground(Color.cardBackground.opacity(0.7)) } Section { @@ -99,7 +99,7 @@ private extension ShopSettingsView { Label(String.shopSettingsNumberTagsWebpageLabel, systemImage: "globe") } } - .listRowBackground(Color.cardBackground) + .listRowBackground(Color.cardBackground.opacity(0.7)) Section { VStack(spacing: NativeAppTemplateConstants.Spacing.xxs) { From a501774b8025d7ff0d096670f5639d957476ea4c Mon Sep 17 00:00:00 2001 From: dadachi Date: Tue, 31 Mar 2026 10:32:34 +0900 Subject: [PATCH 08/10] Update Lock toggle to button style in ItemTagDetailView Use .toggleStyle(.button) instead of fixed frame width, and add .lineLimit(1) to the label text. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../UI/Shop Settings/ItemTag Detail/ItemTagDetailView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NativeAppTemplate/UI/Shop Settings/ItemTag Detail/ItemTagDetailView.swift b/NativeAppTemplate/UI/Shop Settings/ItemTag Detail/ItemTagDetailView.swift index 1261a8e..32b8e4b 100644 --- a/NativeAppTemplate/UI/Shop Settings/ItemTag Detail/ItemTagDetailView.swift +++ b/NativeAppTemplate/UI/Shop Settings/ItemTag Detail/ItemTagDetailView.swift @@ -67,9 +67,10 @@ private extension ItemTagDetailView { GroupBox(label: Label(String("Lock"), systemImage: "lock")) { Toggle(isOn: $viewModel.isLocked) { Text(verbatim: "Lock") + .lineLimit(1) } + .toggleStyle(.button) .dynamicTypeSize(...DynamicTypeSize.large) - .frame(width: NativeAppTemplateConstants.Spacing.xxxl) .tint(.lockForeground) if viewModel.isLocked { From c601193829a174364a98551adfb9abf2fabe2b4c Mon Sep 17 00:00:00 2001 From: dadachi Date: Tue, 31 Mar 2026 10:34:08 +0900 Subject: [PATCH 09/10] Remove hardcoded toolbar background from ScanView Co-Authored-By: Claude Opus 4.6 (1M context) --- NativeAppTemplate/UI/Scan/ScanView.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/NativeAppTemplate/UI/Scan/ScanView.swift b/NativeAppTemplate/UI/Scan/ScanView.swift index b348003..9b7b2cf 100644 --- a/NativeAppTemplate/UI/Scan/ScanView.swift +++ b/NativeAppTemplate/UI/Scan/ScanView.swift @@ -137,8 +137,6 @@ private extension ScanView { .pickerStyle(SegmentedPickerStyle()) } } - .toolbarBackground(.backgroundColor, for: .navigationBar) - .toolbarBackground(.visible, for: .navigationBar) .padding() .confirmationDialog( String.itemTagAlreadyCompleted, From 7bec6ee0021b4c4f9f79e176709bcae18e50d881 Mon Sep 17 00:00:00 2001 From: dadachi Date: Tue, 31 Mar 2026 18:36:06 +0900 Subject: [PATCH 10/10] Revert unintended SwiftFormat changes to unrelated files Restore CertificatePinningDelegate, Logger, Service, AppTabView, Constants, and UtilityTest to their original state. Co-Authored-By: Claude Opus 4.6 (1M context) --- NativeAppTemplate/Constants.swift | 2 +- NativeAppTemplate/Logging/Logger.swift | 8 +++--- .../Network/CertificatePinningDelegate.swift | 26 ++++++++++--------- .../Networking/Services/Service.swift | 4 +-- .../UI/App Root/AppTabView.swift | 2 +- .../Utilities/UtilityTest.swift | 1 + 6 files changed, 22 insertions(+), 21 deletions(-) diff --git a/NativeAppTemplate/Constants.swift b/NativeAppTemplate/Constants.swift index 9bf19a0..df8461f 100644 --- a/NativeAppTemplate/Constants.swift +++ b/NativeAppTemplate/Constants.swift @@ -3,8 +3,8 @@ // NativeAppTemplate // -import typealias Foundation.TimeInterval import SwiftUI +import typealias Foundation.TimeInterval extension Int { static let minimumPasswordLength: Int = 8 diff --git a/NativeAppTemplate/Logging/Logger.swift b/NativeAppTemplate/Logging/Logger.swift index fede01f..4f2c636 100644 --- a/NativeAppTemplate/Logging/Logger.swift +++ b/NativeAppTemplate/Logging/Logger.swift @@ -69,9 +69,9 @@ struct Failure { func log() { appLogger.error( """ - \(action, privacy: .public) \ - source=\(source, privacy: .public) \ - reason=\(reason, privacy: .private) + \(self.action, privacy: .public) \ + source=\(self.source, privacy: .public) \ + reason=\(self.reason, privacy: .private) """ ) } @@ -99,6 +99,6 @@ struct Event { private let action: String func log() { - appLogger.info("EVENT:: source: \(source, privacy: .public), action: \(action, privacy: .public)") + appLogger.info("EVENT:: source: \(self.source, privacy: .public), action: \(self.action, privacy: .public)") } } diff --git a/NativeAppTemplate/Networking/Network/CertificatePinningDelegate.swift b/NativeAppTemplate/Networking/Network/CertificatePinningDelegate.swift index 1cbe7ec..ac18604 100644 --- a/NativeAppTemplate/Networking/Network/CertificatePinningDelegate.swift +++ b/NativeAppTemplate/Networking/Network/CertificatePinningDelegate.swift @@ -2,14 +2,16 @@ // CertificatePinningDelegate.swift // NativeAppTemplate // +// Created by Daisuke Adachi. +// import CommonCrypto import Foundation final class CertificatePinningDelegate: NSObject, URLSessionDelegate { - /// SPKI SHA-256 hashes (base64-encoded) for api.nativeapptemplate.com - /// The server uses Google Trust Services certificates (Render hosting). - /// Pin the leaf public key and Google Trust Services intermediate CAs as backup. + // SPKI SHA-256 hashes (base64-encoded) for api.nativeapptemplate.com + // The server uses Google Trust Services certificates (Render hosting). + // Pin the leaf public key and Google Trust Services intermediate CAs as backup. static let pinnedHashes: Set = [ // Leaf certificate public key (api.nativeapptemplate.com) "54Il7gpV4QvX8fAyEKV+6fp8VGjgHqIAAqF5bLCfYNQ=", @@ -19,19 +21,19 @@ final class CertificatePinningDelegate: NSObject, URLSessionDelegate { static let pinnedDomain = String.domain - /// ASN.1 header for EC 256-bit public key (SPKI prefix) + // ASN.1 header for EC 256-bit public key (SPKI prefix) private static let ecDsaSecp256r1Asn1Header: [UInt8] = [ - 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, - 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, - 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, + 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2A, 0x86, + 0x48, 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x08, 0x2A, + 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00 ] - /// ASN.1 header for RSA 2048-bit public key (SPKI prefix) + // ASN.1 header for RSA 2048-bit public key (SPKI prefix) private static let rsa2048Asn1Header: [UInt8] = [ - 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, - 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, - 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00 + 0x30, 0x82, 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, + 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, + 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0F, 0x00 ] func urlSession( @@ -50,7 +52,7 @@ final class CertificatePinningDelegate: NSObject, URLSessionDelegate { let certificateCount = SecTrustGetCertificateCount(serverTrust) var pinMatched = false - for index in 0 ..< certificateCount { + for index in 0..