Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/CI-iOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# This workflow contains a single job called "build-and-test"
build-and-test:
# The type of runner that the job will run on
runs-on: macos-15-xlarge
runs-on: macos-26-xlarge

timeout-minutes: 8

Expand All @@ -22,10 +22,10 @@ jobs:
- uses: actions/checkout@v4

- name: Select Xcode
run: sudo xcode-select -switch /Applications/Xcode_16.2.app
run: sudo xcode-select -switch /Applications/Xcode_26.0.app

- name: Xcode version
run: /usr/bin/xcodebuild -version

- name: Build and Test
run: xcodebuild clean build test -workspace EssentialApp/EssentialApp.xcworkspace -scheme "CI_iOS" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 16 Pro,OS=18.2" ONLY_ACTIVE_ARCH=YES
run: xcodebuild clean build test -workspace EssentialApp/EssentialApp.xcworkspace -scheme "CI_iOS" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 17 Pro,OS=26.0" ONLY_ACTIVE_ARCH=YES
4 changes: 2 additions & 2 deletions .github/workflows/CI-macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# This workflow contains a single job called "build-and-test"
build-and-test:
# The type of runner that the job will run on
runs-on: macos-15
runs-on: macos-26

timeout-minutes: 8

Expand All @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v4

- name: Select Xcode
run: sudo xcode-select -switch /Applications/Xcode_16.2.app
run: sudo xcode-select -switch /Applications/Xcode_26.0.app

- name: Xcode version
run: /usr/bin/xcodebuild -version
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# This workflow contains a single job called "build-and-deploy"
build-and-deploy:
# The type of runner that the job will run on
runs-on: macos-15
runs-on: macos-26

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand All @@ -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_16.2.app
run: sudo xcode-select -switch /Applications/Xcode_26.0.app

- name: Xcode version
run: /usr/bin/xcodebuild -version
Expand Down
6 changes: 3 additions & 3 deletions EssentialApp/EssentialApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1120;
LastUpgradeCheck = 1620;
LastUpgradeCheck = 2600;
ORGANIZATIONNAME = "Essential Developer";
TargetAttributes = {
0895DA82234B3B950031BB2D = {
Expand Down Expand Up @@ -420,7 +420,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -479,7 +479,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
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 = "1620"
LastUpgradeVersion = "2600"
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 = "1620"
LastUpgradeVersion = "2600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
10 changes: 6 additions & 4 deletions EssentialApp/EssentialAppTests/FeedAcceptanceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ class FeedAcceptanceTests: XCTestCase {
func test_onLaunch_displaysCachedRemoteFeedWhenCustomerHasNoConnectivity() throws {
let sharedStore = try CoreDataFeedStore.empty

let onlineFeed = launch(httpClient: .online(response), store: sharedStore)
let onlineFeed = try launch(httpClient: .online(response), store: sharedStore)
onlineFeed.simulateFeedImageViewVisible(at: 0)
onlineFeed.simulateFeedImageViewVisible(at: 1)
onlineFeed.simulateLoadMoreFeedAction()
onlineFeed.simulateFeedImageViewVisible(at: 2)

let offlineFeed = launch(httpClient: .offline, store: sharedStore)
let offlineFeed = try launch(httpClient: .offline, store: sharedStore)

XCTAssertEqual(offlineFeed.numberOfRenderedFeedImageViews(), 3)
XCTAssertEqual(offlineFeed.renderedFeedImageData(at: 0), makeImageData0())
Expand Down Expand Up @@ -85,9 +85,11 @@ class FeedAcceptanceTests: XCTestCase {
private func launch(
httpClient: HTTPClientStub = .offline,
store: CoreDataFeedStore
) -> ListViewController {
) throws -> ListViewController {
let sut = SceneDelegate(httpClient: httpClient, store: store)
sut.window = UIWindow(frame: CGRect(x: 0, y: 0, width: 390, height: 1))
let dummyScene = try XCTUnwrap((UIWindowScene.self as NSObject.Type).init() as? UIWindowScene)
sut.window = UIWindow(windowScene: dummyScene)
sut.window?.frame = CGRect(x: 0, y: 0, width: 390, height: 1)
sut.configureWindow()

let nav = sut.window?.rootViewController as? UINavigationController
Expand Down
16 changes: 11 additions & 5 deletions EssentialApp/EssentialAppTests/SceneDelegateTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ import EssentialFeediOS

class SceneDelegateTests: XCTestCase {

func test_configureWindow_setsWindowAsKeyAndVisible() {
let window = UIWindowSpy()
func test_configureWindow_setsWindowAsKeyAndVisible() throws {
let sut = SceneDelegate()

let window = try UIWindowSpy.make()
sut.window = window

sut.configureWindow()

XCTAssertEqual(window.makeKeyAndVisibleCallCount, 1, "Expected to make window key and visible")
}

func test_configureWindow_configuresRootViewController() {
func test_configureWindow_configuresRootViewController() throws {
let sut = SceneDelegate()
sut.window = UIWindowSpy()
sut.window = try UIWindowSpy.make()

sut.configureWindow()

let root = sut.window?.rootViewController
Expand All @@ -35,6 +36,11 @@ class SceneDelegateTests: XCTestCase {
private class UIWindowSpy: UIWindow {
var makeKeyAndVisibleCallCount = 0

static func make() throws -> UIWindowSpy {
let dummyScene = try XCTUnwrap((UIWindowScene.self as NSObject.Type).init() as? UIWindowScene)
return UIWindowSpy(windowScene: dummyScene)
}

override func makeKeyAndVisible() {
makeKeyAndVisibleCallCount += 1
}
Expand Down
10 changes: 5 additions & 5 deletions EssentialFeed/EssentialFeed.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1020;
LastUpgradeCheck = 1620;
LastUpgradeCheck = 2600;
ORGANIZATIONNAME = "Essential Developer";
TargetAttributes = {
080EDEF021B6DA7E00813479 = {
Expand Down Expand Up @@ -1438,8 +1438,8 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MACOSX_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
MACOSX_DEPLOYMENT_TARGET = 26.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -1503,8 +1503,8 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MACOSX_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
MACOSX_DEPLOYMENT_TARGET = 26.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
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 = "1620"
LastUpgradeVersion = "2600"
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 = "1620"
LastUpgradeVersion = "2600"
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 = "1620"
LastUpgradeVersion = "2600"
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 = "1620"
LastUpgradeVersion = "2600"
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 = "1620"
LastUpgradeVersion = "2600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ private final class SnapshotWindow: UIWindow {
private var configuration: SnapshotConfiguration = .iPhone(style: .light)

convenience init(configuration: SnapshotConfiguration, root: UIViewController) {
self.init(frame: CGRect(origin: .zero, size: configuration.size))
let dummyScene = (UIWindowScene.self as NSObject.Type).init() as! UIWindowScene
self.init(windowScene: dummyScene)
self.frame = CGRect(origin: .zero, size: configuration.size)
self.configuration = configuration
self.layoutMargins = configuration.layoutMargins
self.rootViewController = root
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.