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 to Xcode 15.0.1 / iOS 17.0.1 #75

Merged
merged 10 commits into from
Oct 26, 2023
8 changes: 4 additions & 4 deletions .github/workflows/CI-iOS.yml
Original file line number Diff line number Diff line change
@@ -12,20 +12,20 @@ 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-13
runs-on: macos-13-xlarge

timeout-minutes: 10
timeout-minutes: 20

# 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@v2

- name: Select Xcode
run: sudo xcode-select -switch /Applications/Xcode_14.3.app
run: sudo xcode-select -switch /Applications/Xcode_15.0.1.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 14,OS=16.4" 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 15 Pro,OS=17.0.1" ONLY_ACTIVE_ARCH=YES
2 changes: 1 addition & 1 deletion .github/workflows/CI-macOS.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v2

- name: Select Xcode
run: sudo xcode-select -switch /Applications/Xcode_14.3.app
run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app

- name: Xcode version
run: /usr/bin/xcodebuild -version
2 changes: 1 addition & 1 deletion .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
@@ -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_14.3.app
run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app

- name: Xcode version
run: /usr/bin/xcodebuild -version
33 changes: 25 additions & 8 deletions EssentialApp/EssentialApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
@@ -252,8 +252,9 @@
0895DA7B234B3B950031BB2D /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1120;
LastUpgradeCheck = 1100;
LastUpgradeCheck = 1500;
ORGANIZATIONNAME = "Essential Developer";
TargetAttributes = {
0895DA82234B3B950031BB2D = {
@@ -376,6 +377,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
@@ -410,6 +412,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
@@ -424,7 +427,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
@@ -438,6 +441,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
@@ -472,6 +476,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -480,7 +485,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
@@ -505,8 +510,11 @@
PRODUCT_BUNDLE_IDENTIFIER = com.essentialdeveloper.EssentialAppCaseStudy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
};
@@ -525,8 +533,11 @@
PRODUCT_BUNDLE_IDENTIFIER = com.essentialdeveloper.EssentialAppCaseStudy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "Essential App Case Study (Production)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
};
@@ -546,9 +557,12 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.essentialdeveloper.EssentialAppTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = 1;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EssentialApp.app/EssentialApp";
};
name = Debug;
@@ -569,8 +583,11 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.essentialdeveloper.EssentialAppTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = 1;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EssentialApp.app/EssentialApp";
};
name = Release;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
37 changes: 24 additions & 13 deletions EssentialApp/EssentialAppTests/CommentsUIIntegrationTests.swift
Original file line number Diff line number Diff line change
@@ -14,17 +14,17 @@ class CommentsUIIntegrationTests: XCTestCase {
func test_commentsView_hasTitle() {
let (sut, _) = makeSUT()

sut.loadViewIfNeeded()
sut.simulateAppearance()

XCTAssertEqual(sut.title, commentsTitle)
}

func test_loadCommentsActions_requestCommentsFromLoader() {
let (sut, loader) = makeSUT()
XCTAssertEqual(loader.loadCommentsCallCount, 0, "Expected no loading requests before view is loaded")
XCTAssertEqual(loader.loadCommentsCallCount, 0, "Expected no loading requests before view appears")

sut.loadViewIfNeeded()
XCTAssertEqual(loader.loadCommentsCallCount, 1, "Expected a loading request once view is loaded")
sut.simulateAppearance()
XCTAssertEqual(loader.loadCommentsCallCount, 1, "Expected a loading request once view appears")

sut.simulateUserInitiatedReload()
XCTAssertEqual(loader.loadCommentsCallCount, 1, "Expected no request until previous completes")
@@ -38,11 +38,22 @@ class CommentsUIIntegrationTests: XCTestCase {
XCTAssertEqual(loader.loadCommentsCallCount, 3, "Expected yet another loading request once user initiates another reload")
}

func test_loadCommentsActions_runsAutomaticallyOnlyOnFirstAppearance() {
let (sut, loader) = makeSUT()
XCTAssertEqual(loader.loadCommentsCallCount, 0, "Expected no loading requests before view appears")

sut.simulateAppearance()
XCTAssertEqual(loader.loadCommentsCallCount, 1, "Expected a loading request once view appears")

sut.simulateAppearance()
XCTAssertEqual(loader.loadCommentsCallCount, 1, "Expected no loading request the second time view appears")
}

func test_loadingCommentsIndicator_isVisibleWhileLoadingComments() {
let (sut, loader) = makeSUT()

sut.loadViewIfNeeded()
XCTAssertTrue(sut.isShowingLoadingIndicator, "Expected loading indicator once view is loaded")
sut.simulateAppearance()
XCTAssertTrue(sut.isShowingLoadingIndicator, "Expected loading indicator once view appears")

loader.completeCommentsLoading(at: 0)
XCTAssertFalse(sut.isShowingLoadingIndicator, "Expected no loading indicator once loading completes successfully")
@@ -59,7 +70,7 @@ class CommentsUIIntegrationTests: XCTestCase {
let comment1 = makeComment(message: "another message", username: "another username")
let (sut, loader) = makeSUT()

sut.loadViewIfNeeded()
sut.simulateAppearance()
assertThat(sut, isRendering: [ImageComment]())

loader.completeCommentsLoading(with: [comment0], at: 0)
@@ -74,7 +85,7 @@ class CommentsUIIntegrationTests: XCTestCase {
let comment = makeComment()
let (sut, loader) = makeSUT()

sut.loadViewIfNeeded()
sut.simulateAppearance()
loader.completeCommentsLoading(with: [comment], at: 0)
assertThat(sut, isRendering: [comment])

@@ -87,7 +98,7 @@ class CommentsUIIntegrationTests: XCTestCase {
let comment = makeComment()
let (sut, loader) = makeSUT()

sut.loadViewIfNeeded()
sut.simulateAppearance()
loader.completeCommentsLoading(with: [comment], at: 0)
assertThat(sut, isRendering: [comment])

@@ -98,7 +109,7 @@ class CommentsUIIntegrationTests: XCTestCase {

func test_loadCommentsCompletion_dispatchesFromBackgroundToMainThread() {
let (sut, loader) = makeSUT()
sut.loadViewIfNeeded()
sut.simulateAppearance()

let exp = expectation(description: "Wait for background queue")
DispatchQueue.global().async {
@@ -111,7 +122,7 @@ class CommentsUIIntegrationTests: XCTestCase {
func test_loadCommentsCompletion_rendersErrorMessageOnErrorUntilNextReload() {
let (sut, loader) = makeSUT()

sut.loadViewIfNeeded()
sut.simulateAppearance()
XCTAssertEqual(sut.errorMessage, nil)

loader.completeCommentsLoadingWithError(at: 0)
@@ -124,7 +135,7 @@ class CommentsUIIntegrationTests: XCTestCase {
func test_tapOnErrorView_hidesErrorMessage() {
let (sut, loader) = makeSUT()

sut.loadViewIfNeeded()
sut.simulateAppearance()
XCTAssertEqual(sut.errorMessage, nil)

loader.completeCommentsLoadingWithError(at: 0)
@@ -147,7 +158,7 @@ class CommentsUIIntegrationTests: XCTestCase {
}).eraseToAnyPublisher()
})

sut?.loadViewIfNeeded()
sut?.simulateAppearance()
}

XCTAssertEqual(cancelCallCount, 0)
10 changes: 7 additions & 3 deletions EssentialApp/EssentialAppTests/FeedAcceptanceTests.swift
Original file line number Diff line number Diff line change
@@ -87,11 +87,13 @@ class FeedAcceptanceTests: XCTestCase {
store: InMemoryFeedStore = .empty
) -> ListViewController {
let sut = SceneDelegate(httpClient: httpClient, store: store, scheduler: .immediateOnMainQueue)
sut.window = UIWindow(frame: CGRect(x: 0, y: 0, width: 1, height: 1))
sut.window = UIWindow(frame: CGRect(x: 0, y: 0, width: 390, height: 1))
sut.configureWindow()

let nav = sut.window?.rootViewController as? UINavigationController
return nav?.topViewController as! ListViewController
let vc = nav?.topViewController as! ListViewController
vc.simulateAppearance()
return vc
}

private func enterBackground(with store: InMemoryFeedStore) {
@@ -106,7 +108,9 @@ class FeedAcceptanceTests: XCTestCase {
RunLoop.current.run(until: Date())

let nav = feed.navigationController
return nav?.topViewController as! ListViewController
let vc = nav?.topViewController as! ListViewController
vc.simulateAppearance()
return vc
}

private func response(for url: URL) -> (Data, HTTPURLResponse) {
Loading