Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minimum version to iOS15 #416

Merged
merged 8 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/fastlane-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ on:

jobs:
build:
runs-on: macos-12
runs-on: macos-13

steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v4
- name: Use sample configuration
run: cp BeeSwift/Config.swift.sample BeeKit/Config.swift
Expand Down
34 changes: 19 additions & 15 deletions BeeSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@
BuildIndependentTargetsInParallel = YES;
LastSwiftMigration = 0710;
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1500;
ORGANIZATIONNAME = APB;
TargetAttributes = {
A12E694C1BD3EF0200AB94C2 = {
Expand Down Expand Up @@ -1415,7 +1415,7 @@
EXCLUDED_ARCHS = "";
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = BeeSwiftToday/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -1442,7 +1442,7 @@
EXCLUDED_ARCHS = "";
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = BeeSwiftToday/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -1462,6 +1462,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -1493,6 +1494,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
EXCLUDED_ARCHS = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
Expand All @@ -1509,7 +1511,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE = "";
Expand All @@ -1523,6 +1525,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -1554,6 +1557,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
EXCLUDED_ARCHS = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
Expand All @@ -1563,7 +1567,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1593,7 +1597,7 @@
);
INFOPLIST_FILE = BeeSwift/Info.plist;
INTENTS_CODEGEN_LANGUAGE = Swift;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1630,7 +1634,7 @@
GCC_OPTIMIZATION_LEVEL = s;
INFOPLIST_FILE = BeeSwift/Info.plist;
INTENTS_CODEGEN_LANGUAGE = Swift;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1720,7 +1724,7 @@
INFOPLIST_FILE = BeeKit/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
INTENTS_CODEGEN_LANGUAGE = Swift;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1767,7 +1771,7 @@
INFOPLIST_FILE = BeeKit/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
INTENTS_CODEGEN_LANGUAGE = Swift;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1802,7 +1806,7 @@
DEVELOPMENT_TEAM = 8TW9V9HVES;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = BeeKitTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1832,7 +1836,7 @@
DEVELOPMENT_TEAM = 8TW9V9HVES;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = BeeKitTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1866,7 +1870,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = BeeSwiftIntents/Info.plist;
INTENTS_CODEGEN_LANGUAGE = Swift;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1901,7 +1905,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = BeeSwiftIntents/Info.plist;
INTENTS_CODEGEN_LANGUAGE = Swift;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1930,7 +1934,7 @@
DEVELOPMENT_TEAM = 8TW9V9HVES;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = BeeSwiftUITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1960,7 +1964,7 @@
DEVELOPMENT_TEAM = 8TW9V9HVES;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = BeeSwiftUITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1500"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
Expand Down
11 changes: 1 addition & 10 deletions BeeSwift.xcodeproj/xcshareddata/xcschemes/BeeSwiftTests.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -67,15 +67,6 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A196CB2B1AE4142F00B90A3E"
BuildableName = "BeeSwiftTests.xctest"
BlueprintName = "BeeSwiftTests"
ReferencedContainer = "container:BeeSwift.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1500"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion BeeSwift/ConfigureHKMetricViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class ConfigureHKMetricViewController : UIViewController {
do {
let _ = try await ServiceLocator.requestManager.put(url: "api/v1/users/\(ServiceLocator.currentUserManager.username!)/goals/\(self.goal.slug).json", parameters: params)
hud.mode = .customView
hud.customView = UIImageView(image: UIImage(named: "checkmark"))
hud.customView = UIImageView(image: UIImage(named: "BasicCheckmark"))
hud.hide(animated: true, afterDelay: 2)
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
guard let healthKitConfigController = self.navigationController?.viewControllers.first(where: { vc in vc is HealthKitConfigViewController }) else {
Expand Down
2 changes: 1 addition & 1 deletion BeeSwift/DatapointValueAccessory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class DatapointValueAccessory : UIInputView {
switch UIDevice.current.userInterfaceIdiom {
case .pad, .mac:
return false
case .phone, .carPlay, .tv, .unspecified:
case .phone, .carPlay, .tv, .vision, .unspecified:
return true
@unknown default:
return true
Expand Down
8 changes: 3 additions & 5 deletions BeeSwift/EditDatapointViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ class EditDatapointViewController: UIViewController, UITextFieldDelegate {
let updateButton = UIButton(type: .system)
self.view.addSubview(updateButton)
updateButton.setTitle("Update", for: .normal)
if #available(iOS 15.0, *) {
updateButton.configuration = .filled()
}
updateButton.configuration = .filled()
updateButton.addTarget(self, action: #selector(self.updateButtonPressed), for: .touchUpInside)
updateButton.snp.makeConstraints { (make) in
make.left.right.equalTo(formView)
Expand Down Expand Up @@ -215,7 +213,7 @@ class EditDatapointViewController: UIViewController, UITextFieldDelegate {
let _ = try await ServiceLocator.requestManager.put(url: "api/v1/users/\(ServiceLocator.currentUserManager.username!)/goals/\(self.goalSlug)/datapoints/\(self.datapoint.id).json", parameters: params)
let hud = MBProgressHUD.forView(self.view)
hud?.mode = .customView
hud?.customView = UIImageView(image: UIImage(named: "checkmark"))
hud?.customView = UIImageView(image: UIImage(named: "BasicCheckmark"))
hud?.hide(animated: true, afterDelay: 2)
} catch {
logger.error("Error updating datapoint for goal \(self.goalSlug): \(error)")
Expand All @@ -234,7 +232,7 @@ class EditDatapointViewController: UIViewController, UITextFieldDelegate {

let hud = MBProgressHUD.forView(self.view)
hud?.mode = .customView
hud?.customView = UIImageView(image: UIImage(named: "checkmark"))
hud?.customView = UIImageView(image: UIImage(named: "BasicCheckmark"))
hud?.hide(animated: true, afterDelay: 2)
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
self.navigationController?.popViewController(animated: true)
Expand Down
2 changes: 1 addition & 1 deletion BeeSwift/RemoveHKMetricViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class RemoveHKMetricViewController: UIViewController {
self.goal = Goal(json: JSON(responseObject!))

hud.mode = .customView
hud.customView = UIImageView(image: UIImage(named: "checkmark"))
hud.customView = UIImageView(image: UIImage(named: "BasicCheckmark"))

NotificationCenter.default.post(name: Notification.Name(rawValue: CurrentUserManager.healthKitMetricRemovedNotificationName), object: self, userInfo: ["goal": self.goal as Any])

Expand Down
35 changes: 14 additions & 21 deletions BeeSwift/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,21 @@ class SettingsViewController: UIViewController {
versionLabel.text = "Version: Unknown"
}

if #available(iOS 15.0, *) {
let logsLabel = UILabel()
self.view.addSubview(logsLabel)
logsLabel.textAlignment = .center
logsLabel.text = "Debug Logs »"
logsLabel.font = UIFont(name: "Avenir-Light", size: 16)!
logsLabel.textColor = .systemBlue
logsLabel.isUserInteractionEnabled = true
logsLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(showLogsTapped)))
let logsLabel = UILabel()
self.view.addSubview(logsLabel)
logsLabel.textAlignment = .center
logsLabel.text = "Debug Logs »"
logsLabel.font = UIFont(name: "Avenir-Light", size: 16)!
logsLabel.textColor = .systemBlue
logsLabel.isUserInteractionEnabled = true
logsLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(showLogsTapped)))

logsLabel.snp.makeConstraints { (make) in
make.top.equalTo(versionLabel.snp.bottom).offset(10)
make.bottom.equalTo(self.view.safeAreaLayoutGuide.snp.bottomMargin)
make.width.equalTo(self.view)
}
} else {
versionLabel.snp.makeConstraints { (make) in
make.bottom.equalTo(self.view.safeAreaLayoutGuide.snp.bottomMargin).offset(-10)
}
logsLabel.snp.makeConstraints { (make) in
make.top.equalTo(versionLabel.snp.bottom).offset(10)
make.bottom.equalTo(self.view.safeAreaLayoutGuide.snp.bottomMargin)
make.width.equalTo(self.view)
}

}

@objc func userDefaultsDidChange() {
Expand All @@ -88,9 +83,7 @@ class SettingsViewController: UIViewController {

@objc
func showLogsTapped() {
if #available(iOS 15.0, *) {
self.navigationController?.pushViewController(LogsViewController(), animated: true)
}
self.navigationController?.pushViewController(LogsViewController(), animated: true)
}

}
Expand Down
2 changes: 1 addition & 1 deletion BeeSwiftToday/TodayTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class TodayTableViewCell: UITableViewCell {
self.pollTimer = nil
let hud = MBProgressHUD.forView(self)
hud?.mode = .customView
hud?.customView = UIImageView(image: UIImage(named: "checkmark"))
hud?.customView = UIImageView(image: UIImage(named: "BasicCheckmark"))
hud?.hide(animated: true, afterDelay: 2)
self.valueStepper.value = 0
self.valueLabel.text = "0"
Expand Down