From 188d4fb2fd810c243386660734c0e6c4749bba55 Mon Sep 17 00:00:00 2001 From: Caio Zullo Date: Sun, 28 Jan 2024 14:46:41 +0200 Subject: [PATCH 1/4] Remove unsupported destinations --- EssentialApp/EssentialApp.xcodeproj/project.pbxproj | 4 ++++ EssentialFeed/EssentialFeed.xcodeproj/project.pbxproj | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/EssentialApp/EssentialApp.xcodeproj/project.pbxproj b/EssentialApp/EssentialApp.xcodeproj/project.pbxproj index 8b4eb3dc..3258b825 100644 --- a/EssentialApp/EssentialApp.xcodeproj/project.pbxproj +++ b/EssentialApp/EssentialApp.xcodeproj/project.pbxproj @@ -513,6 +513,7 @@ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; @@ -536,6 +537,7 @@ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; @@ -560,6 +562,7 @@ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; @@ -586,6 +589,7 @@ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EssentialApp.app/EssentialApp"; diff --git a/EssentialFeed/EssentialFeed.xcodeproj/project.pbxproj b/EssentialFeed/EssentialFeed.xcodeproj/project.pbxproj index e87345d2..3f99dd98 100644 --- a/EssentialFeed/EssentialFeed.xcodeproj/project.pbxproj +++ b/EssentialFeed/EssentialFeed.xcodeproj/project.pbxproj @@ -1711,6 +1711,7 @@ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; @@ -1745,6 +1746,7 @@ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; VALIDATE_PRODUCT = YES; @@ -1771,6 +1773,7 @@ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; @@ -1797,6 +1800,7 @@ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; VALIDATE_PRODUCT = YES; From f33be6d99afcce9113fdf8fd70b61bf9e8624ae0 Mon Sep 17 00:00:00 2001 From: Caio Zullo Date: Sun, 28 Jan 2024 14:48:13 +0200 Subject: [PATCH 2/4] Remove unnecessary iOS 15 check since the minimum deployment target is 17 --- .../Shared UI/Controllers/ListViewController.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/EssentialFeed/EssentialFeediOS/Shared UI/Controllers/ListViewController.swift b/EssentialFeed/EssentialFeediOS/Shared UI/Controllers/ListViewController.swift index bc54e774..cff3fbdf 100644 --- a/EssentialFeed/EssentialFeediOS/Shared UI/Controllers/ListViewController.swift +++ b/EssentialFeed/EssentialFeediOS/Shared UI/Controllers/ListViewController.swift @@ -73,11 +73,7 @@ public final class ListViewController: UITableViewController, UITableViewDataSou snapshot.appendItems(cellControllers, toSection: section) } - if #available(iOS 15.0, *) { - dataSource.applySnapshotUsingReloadData(snapshot) - } else { - dataSource.apply(snapshot) - } + dataSource.applySnapshotUsingReloadData(snapshot) } public func display(_ viewModel: ResourceLoadingViewModel) { From ca4ea7a9da2c18a41a1347b37ff823cae8590b42 Mon Sep 17 00:00:00 2001 From: Caio Zullo Date: Sun, 28 Jan 2024 14:49:37 +0200 Subject: [PATCH 3/4] Move refresh call to `viewDidAppear` to fix UI glitch when the VC is pushed in a navigation controller animated --- .../Shared UI/Controllers/ListViewController.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/EssentialFeed/EssentialFeediOS/Shared UI/Controllers/ListViewController.swift b/EssentialFeed/EssentialFeediOS/Shared UI/Controllers/ListViewController.swift index cff3fbdf..0533ebec 100644 --- a/EssentialFeed/EssentialFeediOS/Shared UI/Controllers/ListViewController.swift +++ b/EssentialFeed/EssentialFeediOS/Shared UI/Controllers/ListViewController.swift @@ -14,7 +14,7 @@ public final class ListViewController: UITableViewController, UITableViewDataSou } }() - private var onViewIsAppearing: ((ListViewController) -> Void)? + private var onViewDidAppear: ((ListViewController) -> Void)? public var onRefresh: (() -> Void)? @@ -24,16 +24,16 @@ public final class ListViewController: UITableViewController, UITableViewDataSou configureTableView() configureTraitCollectionObservers() - onViewIsAppearing = { vc in - vc.onViewIsAppearing = nil + onViewDidAppear = { vc in + vc.onViewDidAppear = nil vc.refresh() } } - public override func viewIsAppearing(_ animated: Bool) { - super.viewIsAppearing(animated) + public override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) - onViewIsAppearing?(self) + onViewDidAppear?(self) } private func configureTableView() { From 452bc0b7891a2ddaf20c0511d1ffa4868a44f3ff Mon Sep 17 00:00:00 2001 From: Caio Zullo Date: Sun, 28 Jan 2024 14:52:04 +0200 Subject: [PATCH 4/4] Update CI to run with Xcode 15.2 --- .github/workflows/CI-iOS.yml | 4 ++-- .github/workflows/CI-macOS.yml | 4 ++-- .github/workflows/Deploy.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI-iOS.yml b/.github/workflows/CI-iOS.yml index 46f2f60e..5daef25b 100644 --- a/.github/workflows/CI-iOS.yml +++ b/.github/workflows/CI-iOS.yml @@ -14,7 +14,7 @@ jobs: # The type of runner that the job will run on runs-on: macos-13-xlarge - timeout-minutes: 12 + timeout-minutes: 8 # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - name: Select Xcode - run: sudo xcode-select -switch /Applications/Xcode_15.1.app + run: sudo xcode-select -switch /Applications/Xcode_15.2.app - name: Xcode version run: /usr/bin/xcodebuild -version diff --git a/.github/workflows/CI-macOS.yml b/.github/workflows/CI-macOS.yml index 618f6eac..d1fe95ea 100644 --- a/.github/workflows/CI-macOS.yml +++ b/.github/workflows/CI-macOS.yml @@ -14,7 +14,7 @@ jobs: # The type of runner that the job will run on runs-on: macos-13 - timeout-minutes: 10 + timeout-minutes: 8 # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - name: Select Xcode - run: sudo xcode-select -switch /Applications/Xcode_15.1.app + run: sudo xcode-select -switch /Applications/Xcode_15.2.app - name: Xcode version run: /usr/bin/xcodebuild -version diff --git a/.github/workflows/Deploy.yml b/.github/workflows/Deploy.yml index b215829a..e8a05bd2 100644 --- a/.github/workflows/Deploy.yml +++ b/.github/workflows/Deploy.yml @@ -36,7 +36,7 @@ jobs: security set-key-partition-list -S apple-tool:,apple: -s -k "" ~/Library/Keychains/build.keychain - name: Select Xcode - run: sudo xcode-select -switch /Applications/Xcode_15.1.app + run: sudo xcode-select -switch /Applications/Xcode_15.2.app - name: Xcode version run: /usr/bin/xcodebuild -version