Skip to content

Commit

Permalink
Merge pull request #78 from essentialdevelopercom/xcode15_2
Browse files Browse the repository at this point in the history
Update CI to run with Xcode 15.2
  • Loading branch information
mapostolakis authored Jan 28, 2024
2 parents ff041d6 + 452bc0b commit 83253f6
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI-iOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ 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:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- 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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/CI-macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ 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:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- 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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions EssentialApp/EssentialApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand All @@ -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;
};
Expand All @@ -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;
Expand All @@ -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";
Expand Down
4 changes: 4 additions & 0 deletions EssentialFeed/EssentialFeed.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public final class ListViewController: UITableViewController, UITableViewDataSou
}
}()

private var onViewIsAppearing: ((ListViewController) -> Void)?
private var onViewDidAppear: ((ListViewController) -> Void)?

public var onRefresh: (() -> Void)?

Expand All @@ -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() {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 83253f6

Please sign in to comment.