From 6e231aa5163c6ca06a4a41f4b31a63a863b75015 Mon Sep 17 00:00:00 2001 From: astenvall Date: Thu, 26 Sep 2024 13:47:46 +0200 Subject: [PATCH] Xcode 16 (#99) * CircleCI - Use `Xcode 16` * CircleCI - Update job reference * CircleCI - Fix indentation and bump `Xcode` * CircleCI - Add missing parameter definitions * CircleCI - Use `SCAN_DESTINATION` instead of `SCAN_DEVICE` * CircleCI - Use `xcodebuild` instead of `fastlane scan` * CircleCI - Update `iOS` simulator versions * CircleCI - Add missing parameter definitions for `test_example_project` * Update `Package` files to use `Flow` at `1.12.1` * Update `README` to reference `Xcode 16.0.0` * Update `CHANGELOG` to bump the version * Update project to use `Flow` at version `1.12.1` * Update `CircleCI` to use `Xcode 16`,`iOS 18`, `iPhone 16` --------- Co-authored-by: bartszczepaniak --- .circleci/config.yml | 85 +++++++++++++------ CHANGELOG.md | 3 + Package.resolved | 24 +++--- Package.swift | 9 +- Presentation.xcodeproj/project.pbxproj | 4 +- .../xcshareddata/swiftpm/Package.resolved | 25 +++--- README.md | 2 +- 7 files changed, 94 insertions(+), 58 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 17b58be..a8c09ea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,12 +4,13 @@ version: 2.1 anchors: - - &test_device "iPhone 15" + - &test_device "iPhone 16" + - &test_device_os "18.0" - &clean_before_build true - &test_output_folder test_output - &default_executor macos: - xcode: "15.0.0" + xcode: "16.0.0" env: global: @@ -28,16 +29,31 @@ commands: pod install --verbose test_main_project: + parameters: + simulator: + type: string + default: *test_device + os_version: + type: string + default: *test_device_os steps: - checkout - test_project_and_store_results: project: "Presentation.xcodeproj" scheme: "Presentation" + simulator: <> + os_version: <> test_example_project: parameters: path: # We need to pass a path here because the example projects are in a sub folder of the project type: string + simulator: + type: string + default: *test_device + os_version: + type: string + default: *test_device_os steps: - checkout - pod-install: @@ -47,7 +63,8 @@ commands: scheme: "Example" path: <> test_output_folder: *test_output_folder - simulator: "iPhone 14" + simulator: <> + os_version: <> # We introduced two separate commands for projects and workspaces because we didnt find a generic and non-confusing way to introduce # a condition to only pass either the project or the workspace environment argument to the fastlane scan @@ -58,14 +75,21 @@ commands: type: string scheme: type: string + simulator: + type: string + default: *test_device + os_version: + type: string + default: *test_device_os steps: - run: - command: fastlane scan - environment: - SCAN_PROJECT: <> - SCAN_SCHEME: <> - SCAN_DEVICE: *test_device - SCAN_CLEAN: *clean_before_build + name: Run tests on iOS <> + command: | + xcodebuild -scheme <> \ + -project <> \ + -destination "platform=iOS Simulator,OS=<>,name=<>" \ + clean build test \ + | xcpretty --report junit --output 'test_output/report.junit' - store_artifacts: # This will by default store an html and junit file as artifacts (See "Artifacts" tab in CircleCI report) path: *test_output_folder # test_output is the default temporary folder for fastlane scan output destination: *test_output_folder # This will create a sub structure in the artifacts section in CircleCI @@ -86,16 +110,19 @@ commands: simulator: type: string default: *test_device + os_version: + type: string + default: *test_device_os steps: - run: - command: | + name: Run tests on iOS <> + command: | cd <> - fastlane scan - environment: - SCAN_WORKSPACE: <> - SCAN_SCHEME: <> - SCAN_DEVICE: <> - SCAN_CLEAN: *clean_before_build + xcodebuild -scheme <> \ + -workspace <> \ + -destination "platform=iOS Simulator,OS=<>,name=<>" \ + clean build test \ + | xcpretty --report junit --output '<>/<>/report.junit' - store_artifacts: # This will by default store an html and junit file as artifacts (See "Artifacts" tab in CircleCI report) path: <>/<> # test_output is the default temporary folder for fastlane scan output destination: <> # This will create a sub structure in the artifacts section in CircleCI @@ -128,30 +155,36 @@ jobs: - store_test_results: path: swiftlint.html - test-xcode14-ios16: - macos: - xcode: "14.0.0" - steps: - - test_main_project - - test-xcode15-ios17: + test-xcode16-ios18: <<: *default_executor steps: - test_main_project + test-xcode15-ios17: + macos: + xcode: "15.4.0" + steps: + - test_main_project: + simulator: "iPhone 15" + os_version: "17.5" + test-example-messages: macos: - xcode: "14.0.0" + xcode: "16.0.0" steps: - test_example_project: path: Examples/Messages + simulator: "iPhone 16" + os_version: "18.0" test-example-styles-and-options: macos: - xcode: "14.0.0" + xcode: "16.0.0" steps: - test_example_project: path: Examples/StylesAndOptions + simulator: "iPhone 16" + os_version: "18.0" workflows: version: 2.1 @@ -159,7 +192,7 @@ workflows: jobs: - swiftlint: version: 0.52.2 - - test-xcode14-ios16 + - test-xcode16-ios18 - test-xcode15-ios17 - test-example-messages # Temporary disabled need to be addressed, there are issues in Flow that might fix this thouh example failiure bellow diff --git a/CHANGELOG.md b/CHANGELOG.md index 26f26de..482f703 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 1.18.0 +- Support `Xcode 16` + # 1.17.0 - Save `json` files with `UIViewController` memory leak name diff --git a/Package.resolved b/Package.resolved index 5ec5b6c..ae0d028 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,16 +1,14 @@ { - "object": { - "pins": [ - { - "package": "Flow", - "repositoryURL": "https://github.com/izettle/Flow.git", - "state": { - "branch": null, - "revision": "ad38c734f16a404de8895236424bc4acc5355a3d", - "version": "1.10.1" - } + "pins" : [ + { + "identity" : "flow", + "kind" : "remoteSourceControl", + "location" : "https://github.com/iZettle/Flow.git", + "state" : { + "revision" : "c3e69f924f046207487948dcad55826343a122d5", + "version" : "1.12.1" } - ] - }, - "version": 1 + } + ], + "version" : 2 } diff --git a/Package.swift b/Package.swift index 84581b9..49f833f 100644 --- a/Package.swift +++ b/Package.swift @@ -1,11 +1,11 @@ -// swift-tools-version:5.1 +// swift-tools-version:5.7 import PackageDescription let package = Package( name: "Presentation", platforms: [ - .iOS(.v10) + .iOS(.v12) ], products: [ .library( @@ -13,7 +13,10 @@ let package = Package( targets: ["Presentation"]), ], dependencies: [ - .package(url: "https://github.com/izettle/Flow.git", .upToNextMajor(from: "1.10.0")) + .package( + url: "https://github.com/iZettle/Flow.git", + .upToNextMajor(from: "1.12.1") + ) ], targets: [ .target( diff --git a/Presentation.xcodeproj/project.pbxproj b/Presentation.xcodeproj/project.pbxproj index 29f4f2b..ee2e890 100644 --- a/Presentation.xcodeproj/project.pbxproj +++ b/Presentation.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -593,7 +593,7 @@ repositoryURL = "https://github.com/iZettle/Flow.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 1.10.1; + minimumVersion = 1.12.1; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/Presentation.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Presentation.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index d0e0a81..ce692ac 100644 --- a/Presentation.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Presentation.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,16 +1,15 @@ { - "object": { - "pins": [ - { - "package": "Flow", - "repositoryURL": "https://github.com/iZettle/Flow.git", - "state": { - "branch": null, - "revision": "ad38c734f16a404de8895236424bc4acc5355a3d", - "version": "1.10.1" - } + "originHash" : "af8820cba803a4990a87c58fd7afcb8f3aaf40249a6881c2c5b1e0a7921389a5", + "pins" : [ + { + "identity" : "flow", + "kind" : "remoteSourceControl", + "location" : "https://github.com/iZettle/Flow.git", + "state" : { + "revision" : "c3e69f924f046207487948dcad55826343a122d5", + "version" : "1.12.1" } - ] - }, - "version": 1 + } + ], + "version" : 3 } diff --git a/README.md b/README.md index 9026bf9..cf38190 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Build Status](https://travis-ci.org/iZettle/Presentation.svg?branch=master)](https://travis-ci.org/iZettle/Presentation) [![Platforms](https://img.shields.io/badge/platform-%20iOS-gray.svg)](https://img.shields.io/badge/platform-%20iOS-gray.svg) [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -![Xcode version](https://img.shields.io/badge/Xcode-13.2.0-green) +![Xcode version](https://img.shields.io/badge/Xcode-16.0.0-green) Presentation is an iOS Swift library for working with UI presentations in a more structured way with a focus on: