Skip to content

Commit f650bd2

Browse files
authored
Set swift version (#80)
1 parent 8381662 commit f650bd2

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

.github/workflows/build.yml

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

99
jobs:
1010
build:
11-
runs-on: macos-13
11+
runs-on: macos-14
1212
steps:
1313
- name: Checkout repository
1414
uses: actions/checkout@v3
1515
- name: Select Xcode version
16-
run: sudo xcode-select -s '/Applications/Xcode_15.0.app/Contents/Developer'
16+
run: sudo xcode-select -s '/Applications/Xcode_16.1.0.app/Contents/Developer'
1717
- name: Run fastlane
1818
env:
1919
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
*.DS_Store
2+
.build
3+
.swiftpm

Example/Pow Example.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@
721721
PRODUCT_BUNDLE_IDENTIFIER = "io.movingparts.Pow-Example.Debug";
722722
PRODUCT_NAME = "$(TARGET_NAME)";
723723
SWIFT_EMIT_LOC_STRINGS = YES;
724-
SWIFT_VERSION = 5.0;
724+
SWIFT_VERSION = 6.0;
725725
TARGETED_DEVICE_FAMILY = "1,2";
726726
};
727727
name = Debug;
@@ -753,7 +753,7 @@
753753
PRODUCT_BUNDLE_IDENTIFIER = "io.movingparts.Pow-Example";
754754
PRODUCT_NAME = "$(TARGET_NAME)";
755755
SWIFT_EMIT_LOC_STRINGS = YES;
756-
SWIFT_VERSION = 5.0;
756+
SWIFT_VERSION = 6.0;
757757
TARGETED_DEVICE_FAMILY = "1,2";
758758
};
759759
name = Release;
@@ -787,7 +787,7 @@
787787
repositoryURL = "https://github.com/EmergeTools/SnapshotPreviews-iOS";
788788
requirement = {
789789
kind = exactVersion;
790-
version = 0.7.6;
790+
version = 0.10.21;
791791
};
792792
};
793793
/* End XCRemoteSwiftPackageReference section */

Example/Pow Example/ExampleList.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,21 @@ struct ExampleList: View {
109109
}
110110
}
111111

112-
struct PresentInfoAction {
113-
var action: (any Example.Type) -> ()
112+
struct PresentInfoAction: Sendable {
113+
var action: @MainActor (any Example.Type) -> ()
114114

115-
init(action: @escaping (any Example.Type) -> Void) {
115+
init(action: @escaping @MainActor (any Example.Type) -> Void) {
116116
self.action = action
117117
}
118118

119-
func callAsFunction<T: Example>(_ type: T.Type) {
119+
@MainActor func callAsFunction<T: Example>(_ type: T.Type) {
120120
action(type)
121121
}
122122
}
123123

124124
extension EnvironmentValues {
125-
struct PresentInfoActionKey: EnvironmentKey {
126-
static var defaultValue: PresentInfoAction? = nil
125+
struct PresentInfoActionKey: EnvironmentKey {
126+
static let defaultValue: PresentInfoAction? = nil
127127
}
128128

129129
var presentInfoAction: PresentInfoAction? {

Package.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let package = Package(
2222
dependencies: [
2323
// Dependencies declare other packages that this package depends on.
2424
// .package(url: /* package url */, from: "1.0.0"),
25-
.package(url: "https://github.com/EmergeTools/SnapshotPreviews-iOS", exact: "0.7.6")
25+
.package(url: "https://github.com/EmergeTools/SnapshotPreviews-iOS", exact: "0.10.21")
2626
],
2727
targets: [
2828
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
@@ -35,5 +35,6 @@ let package = Package(
3535
.testTarget(
3636
name: "PowTests",
3737
dependencies: ["Pow"]),
38-
]
38+
],
39+
swiftLanguageVersions: [.v5]
3940
)

0 commit comments

Comments
 (0)