Skip to content

Commit 6350293

Browse files
authored
Swift6 (#183)
1 parent 43d53bc commit 6350293

40 files changed

+271
-190
lines changed

.github/workflows/Build.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
- uses: maxim-lobanov/[email protected]
1515
with:
16-
xcode-version: "15.4"
16+
xcode-version: "16.0"
1717
- uses: actions/checkout@v2
1818
- name: Install xcbeautify
1919
run: brew install xcbeautify
@@ -26,17 +26,11 @@ jobs:
2626
steps:
2727
- uses: maxim-lobanov/[email protected]
2828
with:
29-
xcode-version: "15.4"
29+
xcode-version: "16.0"
3030
- uses: actions/checkout@v2
3131
with:
3232
submodules: true
3333
- name: Install xcbeautify
3434
run: brew install xcbeautify
3535
- name: Test
3636
run: set -o pipefail && xcodebuild -scheme "FluidInterfaceKit-Package" test -destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=17.0.1' -resultBundlePath results/FluidInterfaceKitTests.xcresult | xcbeautify
37-
38-
- uses: kishikawakatsumi/xcresulttool@v1
39-
with:
40-
path: |
41-
results/FluidInterfaceKitTests.xcresult
42-
if: success() || failure()

.github/workflows/Docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ on:
88

99
jobs:
1010
deploy:
11-
runs-on: macos-13
11+
runs-on: macos-14
1212
concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref }}
1414
steps:
1515
- uses: maxim-lobanov/[email protected]
1616
with:
17-
xcode-version: "15.0"
17+
xcode-version: "16.0"
1818
- uses: actions/checkout@v2
1919
with:
2020
submodules: true # Fetch Hugo themes (true OR recursive)

Development/FluidInterfaceKit.xcodeproj/project.pbxproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@
594594
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
595595
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
596596
SWIFT_STRICT_CONCURRENCY = complete;
597+
SWIFT_VERSION = 6.0;
597598
VERSIONING_SYSTEM = "apple-generic";
598599
VERSION_INFO_PREFIX = "";
599600
};
@@ -652,6 +653,7 @@
652653
SWIFT_COMPILATION_MODE = wholemodule;
653654
SWIFT_OPTIMIZATION_LEVEL = "-O";
654655
SWIFT_STRICT_CONCURRENCY = complete;
656+
SWIFT_VERSION = 6.0;
655657
VALIDATE_PRODUCT = YES;
656658
VERSIONING_SYSTEM = "apple-generic";
657659
VERSION_INFO_PREFIX = "";
@@ -683,7 +685,6 @@
683685
SWIFT_EMIT_LOC_STRINGS = YES;
684686
SWIFT_OBJC_BRIDGING_HEADER = "Sources/FluidInterfaceKit-Demo/FluidInterfaceKit-Demo-Bridging-Header.h";
685687
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
686-
SWIFT_VERSION = 5.0;
687688
TARGETED_DEVICE_FAMILY = "1,2";
688689
};
689690
name = Debug;
@@ -712,7 +713,6 @@
712713
PRODUCT_NAME = "$(TARGET_NAME)";
713714
SWIFT_EMIT_LOC_STRINGS = YES;
714715
SWIFT_OBJC_BRIDGING_HEADER = "Sources/FluidInterfaceKit-Demo/FluidInterfaceKit-Demo-Bridging-Header.h";
715-
SWIFT_VERSION = 5.0;
716716
TARGETED_DEVICE_FAMILY = "1,2";
717717
};
718718
name = Release;
@@ -738,7 +738,6 @@
738738
PRODUCT_BUNDLE_IDENTIFIER = app.muukii.ExampleFluidApp;
739739
PRODUCT_NAME = "$(TARGET_NAME)";
740740
SWIFT_EMIT_LOC_STRINGS = YES;
741-
SWIFT_VERSION = 5.0;
742741
TARGETED_DEVICE_FAMILY = 1;
743742
};
744743
name = Debug;
@@ -764,7 +763,6 @@
764763
PRODUCT_BUNDLE_IDENTIFIER = app.muukii.ExampleFluidApp;
765764
PRODUCT_NAME = "$(TARGET_NAME)";
766765
SWIFT_EMIT_LOC_STRINGS = YES;
767-
SWIFT_VERSION = 5.0;
768766
TARGETED_DEVICE_FAMILY = 1;
769767
};
770768
name = Release;

Development/FluidInterfaceKit.xcodeproj/xcshareddata/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232
usesParentBreakpointCondition = "Yes">
3333
</Location>
3434
<Location
35-
uuid = "A2EF7869-1A53-4958-B6C1-1F0B223F1FBA - ed0225d50b1c0976"
35+
uuid = "A2EF7869-1A53-4958-B6C1-1F0B223F1FBA - ca8a62ba89de0751"
3636
shouldBeEnabled = "Yes"
3737
ignoreCount = "0"
3838
continueAfterRunningActions = "No"
3939
symbolName = "UIKit.UIApplicationMain(Swift.Int32, Swift.Optional&lt;Swift.UnsafeMutablePointer&lt;Swift.UnsafeMutablePointer&lt;Swift.Int8&gt;&gt;&gt;, Swift.Optional&lt;Swift.String&gt;, Swift.Optional&lt;Swift.String&gt;) -&gt; Swift.Int32"
40-
moduleName = "UIKitCore"
40+
moduleName = "libswiftUIKit.dylib"
4141
usesParentBreakpointCondition = "Yes">
4242
</Location>
4343
</Locations>

Development/Sources/FluidInterfaceKit-Demo/AppDelegate.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import UIKit
44
@_exported import MockKit
55
@_exported import Ne
66

7-
@UIApplicationMain
8-
class AppDelegate: UIResponder, UIApplicationDelegate {
7+
@main
8+
final class AppDelegate: UIResponder, UIApplicationDelegate {
99

1010
var window: UIWindow?
1111

Development/Sources/FluidInterfaceKit-Demo/UIControl+Closure.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extension UIButton {
5151
static func make(
5252
title: String,
5353
color: UIColor? = nil,
54-
onTap: @escaping () -> Void
54+
onTap: @escaping @MainActor () -> Void
5555
) -> UIButton {
5656
let button = UIButton(type: .system)
5757
button.setAttributedTitle(

Package.resolved

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.5
1+
// swift-tools-version:6.0
22
import PackageDescription
33

44
let package = Package(

Sources/FluidCore/SafeAreaFinder.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
import UIKit
99

1010
/// This class is a helper for finding current safe area insets when they are not available in the direct view hierarchy
11+
@MainActor
1112
public final class SafeAreaFinder: NSObject {
1213

1314
public static let notificationName = Notification.Name(rawValue: "app.muukii.fluid.SafeAreaInsetsManager")
14-
15+
16+
@MainActor
1517
public static let shared = SafeAreaFinder()
1618

1719
private var currentInsets: UIEdgeInsets? = nil
@@ -26,7 +28,7 @@ public final class SafeAreaFinder: NSObject {
2628
}
2729
}
2830

29-
private var currentDisplayLink: CADisplayLink!
31+
private nonisolated(unsafe) var currentDisplayLink: CADisplayLink!
3032

3133
private override init() {
3234

@@ -53,8 +55,8 @@ public final class SafeAreaFinder: NSObject {
5355
}
5456

5557
deinit {
56-
currentDisplayLink.isPaused = true
57-
currentDisplayLink.invalidate()
58+
currentDisplayLink?.isPaused = true
59+
currentDisplayLink?.invalidate()
5860
}
5961

6062
@objc private dynamic func handle() {

Sources/FluidGesture/Drag.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ public struct DragDescriptor {
308308

309309
}
310310

311+
@MainActor
311312
private var ref: Void?
312313

313314
extension UIPanGestureRecognizer {

0 commit comments

Comments
 (0)