From 6af0fda86f488685e68692ece89a7ec9988827a8 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Wed, 8 Feb 2023 20:17:54 -0700 Subject: [PATCH] Use Swift Charts for budget overview actual vs expected --- Twigs.xcodeproj/project.pbxproj | 48 +++++--- .../xcshareddata/xcschemes/Twigs.xcscheme | 2 +- .../xcshareddata/xcschemes/twigs-cli.xcscheme | 2 +- Twigs/Budget/BudgetDetailsView.swift | 106 +++++++----------- Twigs/DataStore.swift | 15 ++- Twigs/en.lproj/Localizable.strings | 11 +- Twigs/es.lproj/Localizable.strings | 12 +- 7 files changed, 100 insertions(+), 96 deletions(-) diff --git a/Twigs.xcodeproj/project.pbxproj b/Twigs.xcodeproj/project.pbxproj index 5f0a7d2..65f2fcd 100644 --- a/Twigs.xcodeproj/project.pbxproj +++ b/Twigs.xcodeproj/project.pbxproj @@ -492,7 +492,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1320; - LastUpgradeCheck = 1340; + LastUpgradeCheck = 1420; ORGANIZATIONNAME = "William Brawner"; TargetAttributes = { 28AC94E9233C373900BFB70A = { @@ -757,7 +757,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -814,7 +814,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = ""; @@ -834,22 +834,27 @@ CODE_SIGN_ENTITLEMENTS = Twigs/Twigs.entitlements; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 19; + CURRENT_PROJECT_VERSION = 22; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; DEVELOPMENT_ASSET_PATHS = "\"Twigs/Preview Content\""; DEVELOPMENT_TEAM = 9Z6DE6KNJ9; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = Twigs/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 15.0; + INFOPLIST_KEY_CFBundleDisplayName = Twigs; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance"; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 16.2; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.wbrawner.projects.budget.ios; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = YES; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,6"; }; @@ -864,21 +869,26 @@ CODE_SIGN_ENTITLEMENTS = Twigs/Twigs.entitlements; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 19; + CURRENT_PROJECT_VERSION = 22; DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; DEVELOPMENT_ASSET_PATHS = "\"Twigs/Preview Content\""; DEVELOPMENT_TEAM = 9Z6DE6KNJ9; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = Twigs/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 15.0; + INFOPLIST_KEY_CFBundleDisplayName = Twigs; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance"; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 16.2; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.wbrawner.projects.budget.ios; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = YES; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,6"; }; @@ -892,7 +902,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 9Z6DE6KNJ9; INFOPLIST_FILE = TwigsTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -902,7 +912,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Twigs.app/Twigs"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Twigs.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Twigs"; }; name = Debug; }; @@ -914,7 +924,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 9Z6DE6KNJ9; INFOPLIST_FILE = TwigsTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -924,7 +934,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Twigs.app/Twigs"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Twigs.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Twigs"; }; name = Release; }; @@ -942,9 +952,10 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.wbrawner.BudgetUITests; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = Budget; + TEST_TARGET_NAME = Twigs; }; name = Debug; }; @@ -962,9 +973,10 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.wbrawner.BudgetUITests; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = Budget; + TEST_TARGET_NAME = Twigs; }; name = Release; }; @@ -974,7 +986,8 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = VJ33S6H7W7; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = 9Z6DE6KNJ9; ENABLE_HARDENED_RUNTIME = YES; MACOSX_DEPLOYMENT_TARGET = 12.1; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -989,7 +1002,8 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = VJ33S6H7W7; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = 9Z6DE6KNJ9; ENABLE_HARDENED_RUNTIME = YES; MACOSX_DEPLOYMENT_TARGET = 12.1; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Twigs.xcodeproj/xcshareddata/xcschemes/Twigs.xcscheme b/Twigs.xcodeproj/xcshareddata/xcschemes/Twigs.xcscheme index 15285d0..dff15ff 100644 --- a/Twigs.xcodeproj/xcshareddata/xcschemes/Twigs.xcscheme +++ b/Twigs.xcodeproj/xcshareddata/xcschemes/Twigs.xcscheme @@ -1,6 +1,6 @@