Skip to content

Commit

Permalink
Migrate to Xcode 16
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyome22 committed Dec 27, 2024
1 parent dbca050 commit dbe3290
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
build:
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_16.app/Contents/Developer

steps:
- name: Checkout
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Unit Test
runs-on: macos-14
env:
DEVELOPER_DIR: "/Applications/Xcode_15.4.app/Contents/Developer"
DEVELOPER_DIR: "/Applications/Xcode_16.app/Contents/Developer"
timeout-minutes: 30

steps:
Expand All @@ -27,12 +27,5 @@ jobs:
xcodebuild test \
-project Examples/Examples.xcodeproj \
-scheme Examples \
-destination "platform=iOS Simulator,name=iPhone 15,OS=17.5" \
-destination "platform=iOS Simulator,name=iPhone 15,OS=18.0" \
-resultBundlePath TestResults/result_bundle
- name: Archive test results
if: success() || failure()
uses: kishikawakatsumi/xcresulttool@2b37f116695328d5e503ac8dadca0f1545a51da4 #v1.7.1
with:
path: TestResults/result_bundle.xcresult
show-passed-tests: false
40 changes: 16 additions & 24 deletions Examples/Examples.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objectVersion = 77;
objects = {

/* Begin PBXBuildFile section */
183D25902B56695D001FDBDB /* ExamplesApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 183D258F2B56695D001FDBDB /* ExamplesApp.swift */; };
183D25922B56695D001FDBDB /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 183D25912B56695D001FDBDB /* ContentView.swift */; };
183D25942B566967001FDBDB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 183D25932B566967001FDBDB /* Assets.xcassets */; };
183D25982B566967001FDBDB /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 183D25972B566967001FDBDB /* Preview Assets.xcassets */; };
183D25A12B5669ED001FDBDB /* WebUI in Frameworks */ = {isa = PBXBuildFile; productRef = 183D25A02B5669ED001FDBDB /* WebUI */; };
183D25A32B566AE8001FDBDB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 183D25A22B566AE8001FDBDB /* AppDelegate.swift */; };
1852BC8F2CBFB72600133987 /* sample.html in Resources */ = {isa = PBXBuildFile; fileRef = 1852BC8E2CBFB72600133987 /* sample.html */; };
Expand All @@ -34,7 +33,6 @@
183D25912B56695D001FDBDB /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
183D25932B566967001FDBDB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
183D25952B566967001FDBDB /* Examples.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Examples.entitlements; sourceTree = "<group>"; };
183D25972B566967001FDBDB /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
183D259E2B56699B001FDBDB /* WebUI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = WebUI; path = ..; sourceTree = "<group>"; };
183D25A22B566AE8001FDBDB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
183D25A42B566BDB001FDBDB /* Examples.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = Examples.xctestplan; sourceTree = "<group>"; };
Expand Down Expand Up @@ -87,26 +85,17 @@
183D258E2B56695D001FDBDB /* Examples */ = {
isa = PBXGroup;
children = (
183D25952B566967001FDBDB /* Examples.entitlements */,
183D25932B566967001FDBDB /* Assets.xcassets */,
1852BC8E2CBFB72600133987 /* sample.html */,
183D25A22B566AE8001FDBDB /* AppDelegate.swift */,
183D258F2B56695D001FDBDB /* ExamplesApp.swift */,
183D25912B56695D001FDBDB /* ContentView.swift */,
18C686112B6B3DB600D45A40 /* ContentViewState.swift */,
183D25932B566967001FDBDB /* Assets.xcassets */,
183D25952B566967001FDBDB /* Examples.entitlements */,
183D25962B566967001FDBDB /* Preview Content */,
1852BC8E2CBFB72600133987 /* sample.html */,
);
path = Examples;
sourceTree = "<group>";
};
183D25962B566967001FDBDB /* Preview Content */ = {
isa = PBXGroup;
children = (
183D25972B566967001FDBDB /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "<group>";
};
183D259F2B5669ED001FDBDB /* Frameworks */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -171,7 +160,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1530;
LastUpgradeCheck = 1520;
LastUpgradeCheck = 1620;
TargetAttributes = {
183D258B2B56695D001FDBDB = {
CreatedOnToolsVersion = 15.2;
Expand All @@ -183,14 +172,14 @@
};
};
buildConfigurationList = 183D25872B56695D001FDBDB /* Build configuration list for PBXProject "Examples" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 183D25832B56695D001FDBDB;
preferredProjectObjectVersion = 77;
productRefGroup = 183D258D2B56695D001FDBDB /* Products */;
projectDirPath = "";
projectRoot = "";
Expand All @@ -206,7 +195,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
183D25982B566967001FDBDB /* Preview Assets.xcassets in Resources */,
183D25942B566967001FDBDB /* Assets.xcassets in Resources */,
1852BC8F2CBFB72600133987 /* sample.html in Resources */,
);
Expand Down Expand Up @@ -286,6 +274,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -349,6 +338,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -378,7 +368,7 @@
CODE_SIGN_ENTITLEMENTS = Examples/Examples.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Examples/Preview Content\"";
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -402,7 +392,7 @@
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -415,7 +405,7 @@
CODE_SIGN_ENTITLEMENTS = Examples/Examples.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Examples/Preview Content\"";
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -439,7 +429,7 @@
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -449,14 +439,15 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.cybozu.ExamplesUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = Examples;
};
Expand All @@ -467,14 +458,15 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.cybozu.ExamplesUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = Examples;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
{
"originHash" : "952720a94cf1cbde30e832cfc225cf74ed62a4d5b6693f57933a4243e6b84364",
"pins" : [
{
"identity" : "swift-docc-plugin",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-docc-plugin.git",
"state" : {
"revision" : "26ac5758409154cc448d7ab82389c520fa8a8247",
"version" : "1.3.0"
"revision" : "85e4bb4e1cd62cec64a4b8e769dcefdf0c5b9d64",
"version" : "1.4.3"
}
},
{
"identity" : "swift-docc-symbolkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-docc-symbolkit",
"location" : "https://github.com/swiftlang/swift-docc-symbolkit",
"state" : {
"revision" : "b45d1f2ed151d057b54504d653e0da5552844e34",
"version" : "1.0.0"
}
}
],
"version" : 2
"version" : 3
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1620"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions Examples/ExamplesUITests/ExamplesUITests.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import XCTest

final class ExamplesUITests: XCTestCase {
@MainActor
func testHappyPath() {
let app = XCUIApplication()
app.launch()
Expand Down
3 changes: 1 addition & 2 deletions Examples/Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version: 6.0

import PackageDescription

Expand Down
21 changes: 9 additions & 12 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version: 6.0

import PackageDescription

let swiftSettings: [SwiftSetting] = [
.enableUpcomingFeature("ExistentialAny"),
]

let package = Package(
name: "WebUI",
platforms: [
.macOS("13.3"),
.iOS("16.4"),
.visionOS("2.0")
.visionOS(.v2),
],
products: [
.library(
Expand All @@ -17,23 +20,17 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/apple/swift-docc-plugin.git", exact: "1.3.0")
.package(url: "https://github.com/apple/swift-docc-plugin.git", exact: "1.4.3")
],
targets: [
.target(
name: "WebUI",
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("GlobalConcurrency"),
]
swiftSettings: swiftSettings
),
.testTarget(
name: "WebUITests",
dependencies: ["WebUI"],
swiftSettings: [
.enableUpcomingFeature("ExistentialAny")
]
swiftSettings: swiftSettings
)
]
)
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ WebUI is a Swift package that provides WKWebView wrapped by SwiftUI.

## Requirements

- Development with Xcode 15.4+
- Written in Swift 5.10
- Development with Xcode 16.0+
- Written in Swift 6.0
- Compatible with iOS 16.4+
- Compatible with macOS 13.3+

Expand Down Expand Up @@ -129,7 +129,7 @@ WebUI is available through [Swift Package Manager](https://github.com/apple/swif

1. Create `Package.swift` that describes dependencies.
```swift
// swift-tools-version: 5.10
// swift-tools-version: 6.0
import PackageDescription

let package = Package(
Expand All @@ -138,7 +138,7 @@ WebUI is available through [Swift Package Manager](https://github.com/apple/swif
.library(name: "SomeProduct", targets: ["SomeProduct"])
],
dependencies: [
.package(url: "https://github.com/cybozu/WebUI.git", exact: "2.0.0")
.package(url: "https://github.com/cybozu/WebUI.git", exact: "3.0.0")
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Sources/WebUI/SetUpWebViewProxyAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import SwiftUI
import WebKit

struct SetUpWebViewProxyAction {
let action: @MainActor @Sendable (Remakeable<EnhancedWKWebView>) -> Void
var action: @MainActor @Sendable (Remakeable<EnhancedWKWebView>) -> Void

@MainActor
func callAsFunction(_ webView: Remakeable<EnhancedWKWebView>) {
Expand Down

0 comments on commit dbe3290

Please sign in to comment.