diff --git a/Calculator.xcodeproj/project.pbxproj b/Calculator.xcodeproj/project.pbxproj index b4616d7..6ff3464 100644 --- a/Calculator.xcodeproj/project.pbxproj +++ b/Calculator.xcodeproj/project.pbxproj @@ -305,11 +305,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Calculator/Calculator.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Calculator/Preview Content\""; DEVELOPMENT_TEAM = 4UQS8N4WUS; + ENABLE_HARDENED_RUNTIME = NO; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Calculator/Info.plist; @@ -319,7 +321,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MARKETING_VERSION = 0.5.0; + MARKETING_VERSION = 0.5.1; PRODUCT_BUNDLE_IDENTIFIER = anthonyingle.Calculator; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -333,11 +335,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Calculator/Calculator.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Calculator/Preview Content\""; DEVELOPMENT_TEAM = 4UQS8N4WUS; + ENABLE_HARDENED_RUNTIME = NO; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Calculator/Info.plist; @@ -347,7 +351,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MARKETING_VERSION = 0.5.0; + MARKETING_VERSION = 0.5.1; PRODUCT_BUNDLE_IDENTIFIER = anthonyingle.Calculator; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/Calculator/Calculator.entitlements b/Calculator/Calculator.entitlements index f2ef3ae..18aff0c 100644 --- a/Calculator/Calculator.entitlements +++ b/Calculator/Calculator.entitlements @@ -2,9 +2,9 @@ - com.apple.security.app-sandbox - - com.apple.security.files.user-selected.read-only - + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + diff --git a/Calculator/CalculatorView.swift b/Calculator/CalculatorView.swift index dacde7e..7e1fc1c 100644 --- a/Calculator/CalculatorView.swift +++ b/Calculator/CalculatorView.swift @@ -30,6 +30,7 @@ struct CalculatorView: View { .onTapGesture { expression += item.solution } + .foregroundColor(historyIndex != -1 ? (item.id == history[historyIndex].id ? .blue : .white) : .white) // copy solution button Button { @@ -84,10 +85,10 @@ struct CalculatorView: View { onTextChange: { newExpression in if !history.isEmpty && (newExpression == "+" || - newExpression == "*" || - newExpression == "/" || - newExpression == "^" || - newExpression == "%") + newExpression == "*" || + newExpression == "/" || + newExpression == "^" || + newExpression == "%") { expression.insert(contentsOf: history[0].solution, at: expression.startIndex) } @@ -110,9 +111,8 @@ struct CalculatorView: View { if historyIndex > 0 { expression.removeLast(history[historyIndex - 1].solution.count) } - expression += history[historyIndex].solution + expression += history[historyIndex].solution } - }, // on DOWN ARROW key onMoveDown: {