From c88deb496dd5acf7db17c90b90d486d8330150e4 Mon Sep 17 00:00:00 2001 From: Jag-Marcel Date: Wed, 29 May 2024 18:51:52 +0200 Subject: [PATCH 1/5] Update to install screen The new install screen will now show up for iOS versions from 15.0 onwards --- Scribe/AppTexts/English/ENAppText.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scribe/AppTexts/English/ENAppText.swift b/Scribe/AppTexts/English/ENAppText.swift index 4bb418cc..40296a11 100644 --- a/Scribe/AppTexts/English/ENAppText.swift +++ b/Scribe/AppTexts/English/ENAppText.swift @@ -37,7 +37,7 @@ func getENInstallationDirections(fontSize: CGFloat) -> NSMutableAttributedString """, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize)]) var settingsLink = NSMutableAttributedString() - if #available(iOS 17.2.0, *) { + if #available(iOS 15.0, *) { settingsLink = addHyperLinks( originalText: "Open Scribe settings", links: ["Open Scribe settings": "MakeTextLink"], // placeholder as there's a button over it From 52ed6774f6e0c78f85814737a019319a64664de9 Mon Sep 17 00:00:00 2001 From: Jag-Marcel Date: Wed, 29 May 2024 18:52:20 +0200 Subject: [PATCH 2/5] Updated deployment target Changed deployment target to reflect recent changes to the app --- Scribe.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scribe.xcodeproj/project.pbxproj b/Scribe.xcodeproj/project.pbxproj index b90c0a25..6220a047 100644 --- a/Scribe.xcodeproj/project.pbxproj +++ b/Scribe.xcodeproj/project.pbxproj @@ -2973,7 +2973,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -3032,7 +3032,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; From 231b3dfb5f4e04e487415909aefded3ed2516f07 Mon Sep 17 00:00:00 2001 From: Jag-Marcel Date: Fri, 31 May 2024 15:34:49 +0200 Subject: [PATCH 3/5] Specified colours in styling to ScribeColors Without ScribeColors before it, just the key would cause an "Ambiguous use of '.key'" error in the compiler. I assume this was something changed for iOS 14 or 15, the code won't compile unless you specify the used colour library. --- Scribe/AppStyling.swift | 2 +- Scribe/AppTexts/AppTextStyling.swift | 4 +- Scribe/Colors/ColorVariables.swift | 44 +++++++++---------- .../InfoChildTableViewCell.swift | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Scribe/AppStyling.swift b/Scribe/AppStyling.swift index 49ef1aa2..e9f1c103 100644 --- a/Scribe/AppStyling.swift +++ b/Scribe/AppStyling.swift @@ -24,7 +24,7 @@ import UIKit /// - Parameters /// - elem: the element to have shadows added to. func applyShadowEffects(elem: AnyObject) { - elem.layer.shadowColor = UIColor(.keyShadow).light.cgColor + elem.layer.shadowColor = UIColor(ScribeColor.keyShadow).light.cgColor elem.layer.shadowOffset = CGSize(width: 0.0, height: 3.0) elem.layer.shadowOpacity = 1.0 elem.layer.shadowRadius = 3.0 diff --git a/Scribe/AppTexts/AppTextStyling.swift b/Scribe/AppTexts/AppTextStyling.swift index 9f312cba..e9413ba4 100644 --- a/Scribe/AppTexts/AppTextStyling.swift +++ b/Scribe/AppTexts/AppTextStyling.swift @@ -91,7 +91,7 @@ func getArrowIcon(fontSize: CGFloat) -> NSAttributedString { arrowAttachment.image = UIImage( systemName: "arrow.turn.down.right", withConfiguration: selectArrowIconConfig - )?.withTintColor(.init(.keyChar)) + )?.withTintColor(.init(ScribeColor.keyChar)) return NSAttributedString(attachment: arrowAttachment) } @@ -107,7 +107,7 @@ func getGlobeIcon(fontSize: CGFloat) -> NSAttributedString { globeAttachment.image = UIImage( systemName: "globe", withConfiguration: selectGlobeIconConfig - )?.withTintColor(.init(.keyChar)) + )?.withTintColor(.init(ScribeColor.keyChar)) return NSAttributedString(attachment: globeAttachment) } diff --git a/Scribe/Colors/ColorVariables.swift b/Scribe/Colors/ColorVariables.swift index 1363bf73..80fde195 100644 --- a/Scribe/Colors/ColorVariables.swift +++ b/Scribe/Colors/ColorVariables.swift @@ -23,30 +23,30 @@ import UIKit var scribeKeyIcon = UIImage(named: "scribeKeyIcon") // Initialize all colors. -var keyColor = UIColor(.key) -var keyCharColor = UIColor(.keyChar) -var specialKeyColor = UIColor(.keySpecial) -var keyPressedColor = UIColor(.keyPressed) +var keyColor = UIColor(ScribeColor.key) +var keyCharColor = UIColor(ScribeColor.keyChar) +var specialKeyColor = UIColor(ScribeColor.keySpecial) +var keyPressedColor = UIColor(ScribeColor.keyPressed) -var commandKeyColor = UIColor(.commandKey) -var commandBarColor = UIColor(.commandBar) -var commandBarPlaceholderColor = UIColor(.commandBarPlaceholder) -var commandBarPlaceholderColorCG = UIColor(.commandBarPlaceholder).cgColor +var commandKeyColor = UIColor(ScribeColor.commandKey) +var commandBarColor = UIColor(ScribeColor.commandBar) +var commandBarPlaceholderColor = UIColor(ScribeColor.commandBarPlaceholder) +var commandBarPlaceholderColorCG = UIColor(ScribeColor.commandBarPlaceholder).cgColor -var keyboardBgColor = UIColor(.keyboardBackground) -var keyShadowColor = UIColor(.keyShadow).cgColor +var keyboardBgColor = UIColor(ScribeColor.keyboardBackground) +var keyShadowColor = UIColor(ScribeColor.keyShadow).cgColor -var appBtnColor = UIColor(.appBtn) -var menuOptionColor = UIColor(.menuOption) -var lightTextDarkCTA = UIColor(.lightTextDarkCTA) -var lightWhiteDarkBlackColor = UIColor(.lightWhiteDarkBlack) -var linkBlueColor = UIColor(.linkBlue) -var scribeCTAColor = UIColor(.scribeCTA) -var scribeAppBackgroundColor = UIColor(.scribeAppBackground) +var appBtnColor = UIColor(ScribeColor.appBtn) +var menuOptionColor = UIColor(ScribeColor.menuOption) +var lightTextDarkCTA = UIColor(ScribeColor.lightTextDarkCTA) +var lightWhiteDarkBlackColor = UIColor(ScribeColor.lightWhiteDarkBlack) +var linkBlueColor = UIColor(ScribeColor.linkBlue) +var scribeCTAColor = UIColor(ScribeColor.scribeCTA) +var scribeAppBackgroundColor = UIColor(ScribeColor.scribeAppBackground) // Annotation colors. -var annotateRed = UIColor(.annotateRed) -var annotateBlue = UIColor(.annotateBlue) -var annotatePurple = UIColor(.annotatePurple) -var annotateGreen = UIColor(.annotateGreen) -var annotateOrange = UIColor(.annotateOrange) +var annotateRed = UIColor(ScribeColor.annotateRed) +var annotateBlue = UIColor(ScribeColor.annotateBlue) +var annotatePurple = UIColor(ScribeColor.annotatePurple) +var annotateGreen = UIColor(ScribeColor.annotateGreen) +var annotateOrange = UIColor(ScribeColor.annotateOrange) diff --git a/Scribe/Components/InfoChildTableViewCell/InfoChildTableViewCell.swift b/Scribe/Components/InfoChildTableViewCell/InfoChildTableViewCell.swift index 36a8e6f2..6dd07145 100644 --- a/Scribe/Components/InfoChildTableViewCell/InfoChildTableViewCell.swift +++ b/Scribe/Components/InfoChildTableViewCell/InfoChildTableViewCell.swift @@ -114,7 +114,7 @@ final class InfoChildTableViewCell: UITableViewCell { fetchSwitchStateForCell() - toggleSwitch.onTintColor = .init(.scribeCTA).withAlphaComponent(0.4) + toggleSwitch.onTintColor = .init(ScribeColor.scribeCTA).withAlphaComponent(0.4) toggleSwitch.thumbTintColor = toggleSwitch.isOn ? .init(.scribeCTA) : .lightGray } From b302b7a2f9f4046cf4993337f9f75cc032892528 Mon Sep 17 00:00:00 2001 From: Jag-Marcel Date: Fri, 31 May 2024 15:31:39 +0200 Subject: [PATCH 4/5] Finalized switch to iOS 15.0 - iOS deployment target in project.pbxproj is now correctly set for all keyboards. - Simplified code that doesn't require the #available tag for the new target --- Keyboards/KeyboardsBase/KeyboardStyling.swift | 26 +--- .../KeyboardViewController.swift | 6 +- Scribe.xcodeproj/project.pbxproj | 48 +++---- Scribe/AboutTab/AboutViewController.swift | 13 +- Scribe/AppTexts/English/ENAppText.swift | 129 ++++-------------- 5 files changed, 59 insertions(+), 163 deletions(-) diff --git a/Keyboards/KeyboardsBase/KeyboardStyling.swift b/Keyboards/KeyboardsBase/KeyboardStyling.swift index 54f0d837..b17023c0 100644 --- a/Keyboards/KeyboardsBase/KeyboardStyling.swift +++ b/Keyboards/KeyboardsBase/KeyboardStyling.swift @@ -30,26 +30,14 @@ func styleBtn(btn: UIButton, title: String, radius: CGFloat) { btn.layer.masksToBounds = false btn.layer.cornerRadius = radius btn.setTitle(title, for: .normal) - if #available(iOS 15.0, *) { - // Displays info button for missing data - if title == invalidCommandMsg { - btn.configuration = UIButton.Configuration.plain() - btn.configuration?.baseForegroundColor = UITraitCollection.current.userInterfaceStyle == .light ? specialKeyColor : keyColor - btn.configuration?.image = UIImage(systemName: "info.circle.fill") - btn.configuration?.imagePlacement = .trailing - btn.configuration?.imagePadding = 3 - } else { - btn.configuration = nil - } + if title == invalidCommandMsg { + btn.configuration = UIButton.Configuration.plain() + btn.configuration?.baseForegroundColor = UITraitCollection.current.userInterfaceStyle == .light ? specialKeyColor : keyColor + btn.configuration?.image = UIImage(systemName: "info.circle.fill") + btn.configuration?.imagePlacement = .trailing + btn.configuration?.imagePadding = 3 } else { - if title == invalidCommandMsg { - btn.semanticContentAttribute = .forceLeftToRight // Has to be changed once support for RTL languages is implemented - btn.setImage(UIImage(systemName: "info.circle.fill"), for: .normal) - btn.tintColor = UITraitCollection.current.userInterfaceStyle == .light ? specialKeyColor : keyColor - } else { - btn.semanticContentAttribute = .unspecified - btn.setImage(nil, for: .normal) - } + btn.configuration = nil } btn.contentHorizontalAlignment = UIControl.ContentHorizontalAlignment.center btn.setTitleColor(keyCharColor, for: .normal) diff --git a/Keyboards/KeyboardsBase/KeyboardViewController.swift b/Keyboards/KeyboardsBase/KeyboardViewController.swift index 1fc16242..6512a8b9 100644 --- a/Keyboards/KeyboardsBase/KeyboardViewController.swift +++ b/Keyboards/KeyboardsBase/KeyboardViewController.swift @@ -130,11 +130,7 @@ class KeyboardViewController: UIInputViewController { /// - btn: the button to be deactivated. func deactivateBtn(btn: UIButton) { btn.setTitle("", for: .normal) - if #available(iOS 15.0, *) { - btn.configuration?.image = nil - } else { - btn.setImage(nil, for: .normal) - } + btn.configuration?.image = nil btn.backgroundColor = UIColor.clear btn.removeTarget(self, action: #selector(executeKeyActions), for: .touchUpInside) btn.removeTarget(self, action: #selector(keyTouchDown), for: .touchDown) diff --git a/Scribe.xcodeproj/project.pbxproj b/Scribe.xcodeproj/project.pbxproj index 6220a047..b9d1bfb4 100644 --- a/Scribe.xcodeproj/project.pbxproj +++ b/Scribe.xcodeproj/project.pbxproj @@ -3053,7 +3053,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Scribe/Info.plist"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3081,7 +3081,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Scribe/Info.plist"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3108,7 +3108,7 @@ DEVELOPMENT_TEAM = CJJ59NJ7J8; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/German/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Deutsch (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3134,7 +3134,7 @@ DEVELOPMENT_TEAM = CJJ59NJ7J8; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/German/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Deutsch (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3160,7 +3160,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/French/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Français (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3186,7 +3186,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/French/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Français (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3211,7 +3211,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Portuguese/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Português (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3237,7 +3237,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Portuguese/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Português (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3263,7 +3263,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Spanish/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Español (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3289,7 +3289,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Spanish/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Español (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3315,7 +3315,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Russian/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Русская (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3341,7 +3341,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Russian/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Русская (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3367,7 +3367,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Swedish/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Svenska (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3393,7 +3393,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Swedish/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Svenska (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3418,7 +3418,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Norwegian/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Norsk-Bokmål (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3443,7 +3443,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Norwegian/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Norsk-Bokmål (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3468,7 +3468,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/English/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "English (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3493,7 +3493,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/English/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "English (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3518,7 +3518,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Danish/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Dansk (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3543,7 +3543,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Danish/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Dansk (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3568,7 +3568,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Hebrew/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "עִברִית (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3593,7 +3593,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Hebrew/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "עִברִית (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3619,7 +3619,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Italian/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Italiano (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -3645,7 +3645,7 @@ DEVELOPMENT_TEAM = ATJ9U3WZ27; INFOPLIST_FILE = "$(SRCROOT)/Keyboards/LanguageKeyboards/Italian/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Italiano (Scribe)"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/Scribe/AboutTab/AboutViewController.swift b/Scribe/AboutTab/AboutViewController.swift index fb393d1d..98bbb6fd 100644 --- a/Scribe/AboutTab/AboutViewController.swift +++ b/Scribe/AboutTab/AboutViewController.swift @@ -131,17 +131,8 @@ extension AboutViewController { } private func showRateScribeUI() { - if #available(iOS 14.0, *) { - guard let scene = UIApplication.shared.foregroundActiveScene else { return } - SKStoreReviewController.requestReview(in: scene) - } else { - let alert = UIAlertController( - title: "Enjoying Scribe?", message: "Rate Scribe on the App Store.", preferredStyle: .alert - ) - alert.addAction(UIAlertAction(title: "Continue", style: .default, handler: openScribeAppStore(alert:))) - alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil)) - present(alert, animated: true) - } + guard let scene = UIApplication.shared.foregroundActiveScene else { return } + SKStoreReviewController.requestReview(in: scene) } private func openScribeAppStore(alert _: UIAlertAction) { diff --git a/Scribe/AppTexts/English/ENAppText.swift b/Scribe/AppTexts/English/ENAppText.swift index e7dc4ff9..0eb72c40 100644 --- a/Scribe/AppTexts/English/ENAppText.swift +++ b/Scribe/AppTexts/English/ENAppText.swift @@ -21,7 +21,6 @@ import UIKit /// Formats and returns the directions of the installation guidelines. func getENInstallationDirections(fontSize: CGFloat) -> NSMutableAttributedString { - let arrowString = getArrowIcon(fontSize: fontSize) let globeString = getGlobeIcon(fontSize: fontSize) let startOfBody = NSMutableAttributedString(string: """ @@ -29,118 +28,40 @@ func getENInstallationDirections(fontSize: CGFloat) -> NSMutableAttributedString """, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize)]) var settingsLink = NSMutableAttributedString() - if #available(iOS 15.0, *) { - settingsLink = addHyperLinks( - originalText: "Open Scribe settings", - links: ["Open Scribe settings": "MakeTextLink"], // placeholder as there's a button over it - fontSize: fontSize - ) + settingsLink = addHyperLinks( + originalText: "Open Scribe settings", + links: ["Open Scribe settings": "MakeTextLink"], // placeholder as there's a button over it + fontSize: fontSize + ) - let installStart = concatAttributedStrings(left: startOfBody, right: settingsLink) + let installStart = concatAttributedStrings(left: startOfBody, right: settingsLink) - let installDirections = NSMutableAttributedString(string: """ - \n - 2. Select Keyboards - """, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize)]) - - installDirections.addAttribute( - NSAttributedString.Key.font, value: UIFont.boldSystemFont(ofSize: fontSize), - range: NSRange(location: 12, length: "Keyboards".count) - ) - - let finalSteps = NSMutableAttributedString(string: """ - \n - 3. Activate keyboards that you want to use - - 4. When typing press\u{0020} - """, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize)]) - - installDirections.append(finalSteps) - - installDirections.append(globeString) - - installDirections.append(NSMutableAttributedString(string: """ - \u{0020}to select keyboards - """, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize)])) - - return concatAttributedStrings(left: installStart, right: installDirections) - } else { - settingsLink = addHyperLinks( - originalText: "Open Settings", - links: ["Open Settings": "MakeTextLink"], // placeholder as there's a button over it - fontSize: fontSize - ) - - let installStart = concatAttributedStrings(left: startOfBody, right: settingsLink) - - let installDirections = NSMutableAttributedString(string: """ - \n - 2. In General do the following: - - Keyboard - - """, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize)]) - - installDirections.addAttribute( - NSAttributedString.Key.font, value: UIFont.boldSystemFont(ofSize: fontSize), - range: NSRange(location: 8, length: "General".count) - ) - installDirections.addAttribute( - NSAttributedString.Key.font, value: UIFont.boldSystemFont(ofSize: fontSize), - range: NSRange(location: 41, length: "Keyboard".count) - ) - - installDirections.append(NSAttributedString(string: "\n ")) - - installDirections.append(arrowString) - - let keyboardsStep = NSMutableAttributedString(string: """ - \u{0020} Keyboards - - """, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize)]) - - keyboardsStep.addAttribute( - NSAttributedString.Key.font, value: UIFont.boldSystemFont(ofSize: fontSize), - range: NSRange(location: 2, length: "Keyboards".count) - ) - - installDirections.append(keyboardsStep) - - installDirections.append(NSMutableAttributedString( - string: "\n ", - attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize)] - ) - ) - - installDirections.append(arrowString) - - let finalSteps = NSMutableAttributedString(string: """ - \u{0020} Add New Keyboard + let installDirections = NSMutableAttributedString(string: """ + \n + 2. Select Keyboards + """, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize)]) - 3. Select Scribe and then activate keyboards + installDirections.addAttribute( + NSAttributedString.Key.font, value: UIFont.boldSystemFont(ofSize: fontSize), + range: NSRange(location: 12, length: "Keyboards".count) + ) - 4. When typing press\u{0020} - """, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize)]) + let finalSteps = NSMutableAttributedString(string: """ + \n + 3. Activate keyboards that you want to use - finalSteps.addAttribute( - NSAttributedString.Key.font, value: UIFont.boldSystemFont(ofSize: fontSize), - range: NSRange(location: 2, length: "Add New Keyboard".count) - ) - finalSteps.addAttribute( - NSAttributedString.Key.font, value: UIFont.boldSystemFont(ofSize: fontSize), - range: NSRange(location: 30, length: "Scribe".count) - ) + 4. When typing press\u{0020} + """, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize)]) - installDirections.append(finalSteps) + installDirections.append(finalSteps) - installDirections.append(globeString) + installDirections.append(globeString) - installDirections.append(NSMutableAttributedString(string: """ - \u{0020}to select keyboards - """, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize)])) + installDirections.append(NSMutableAttributedString(string: """ + \u{0020}to select keyboards + """, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize)])) - return concatAttributedStrings(left: installStart, right: installDirections) - } + return concatAttributedStrings(left: installStart, right: installDirections) } /// Formats and returns the full text for the installation guidelines. From 9ebdd8904d5620ff0048e9cd5960f3af94c4df62 Mon Sep 17 00:00:00 2001 From: Jag-Marcel Date: Fri, 31 May 2024 15:49:14 +0200 Subject: [PATCH 5/5] Removed deprecated attributes titleEdgeInsets seems to have been deprecated since 15.0, Xcode said it would be ignored in it so it seemed like a good idea to remove it. --- Keyboards/KeyboardsBase/KeyboardKeys.swift | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Keyboards/KeyboardsBase/KeyboardKeys.swift b/Keyboards/KeyboardsBase/KeyboardKeys.swift index e806a416..456100b7 100644 --- a/Keyboards/KeyboardsBase/KeyboardKeys.swift +++ b/Keyboards/KeyboardsBase/KeyboardKeys.swift @@ -130,15 +130,12 @@ class KeyboardKey: UIButton { && !isSpecial && !["123", "´", spaceBar, languageTextForSpaceBar].contains(key) && shiftButtonState == .normal { - titleEdgeInsets = UIEdgeInsets(top: -4.0, left: 0.0, bottom: 0.0, right: 0.0) if isLandscapeView { titleLabel?.font = .systemFont(ofSize: letterKeyWidth / 2.4) } else { titleLabel?.font = .systemFont(ofSize: letterKeyWidth / 1.35) } - } else { - titleEdgeInsets = UIEdgeInsets(top: 0.0, left: 0.0, bottom: 0.0, right: 0.0) } } @@ -187,15 +184,12 @@ class KeyboardKey: UIButton { && !isSpecial && ![".?123", spaceBar, languageTextForSpaceBar, "ß", "´", ",", ".", "'", "-"].contains(key) && shiftButtonState == .normal { - titleEdgeInsets = UIEdgeInsets(top: -4.0, left: 0.0, bottom: 0.0, right: 0.0) if isLandscapeView { titleLabel?.font = .systemFont(ofSize: letterKeyWidth / 3.35) } else { titleLabel?.font = .systemFont(ofSize: letterKeyWidth / 2.75) } - } else { - titleEdgeInsets = UIEdgeInsets(top: 0.0, left: 0.0, bottom: 0.0, right: 0.0) } }