Set swift version (#80)

This commit is contained in:
Itay Brenner 2025-02-18 13:52:15 -03:00 committed by GitHub
parent 8381662164
commit f650bd26c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 13 deletions

View file

@ -8,12 +8,12 @@ on:
jobs: jobs:
build: build:
runs-on: macos-13 runs-on: macos-14
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Select Xcode version - name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_15.0.app/Contents/Developer' run: sudo xcode-select -s '/Applications/Xcode_16.1.0.app/Contents/Developer'
- name: Run fastlane - name: Run fastlane
env: env:
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_TOKEN }} EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_TOKEN }}

2
.gitignore vendored
View file

@ -1 +1,3 @@
*.DS_Store *.DS_Store
.build
.swiftpm

View file

@ -721,7 +721,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "io.movingparts.Pow-Example.Debug"; PRODUCT_BUNDLE_IDENTIFIER = "io.movingparts.Pow-Example.Debug";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0; SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
}; };
name = Debug; name = Debug;
@ -753,7 +753,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "io.movingparts.Pow-Example"; PRODUCT_BUNDLE_IDENTIFIER = "io.movingparts.Pow-Example";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0; SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
}; };
name = Release; name = Release;
@ -787,7 +787,7 @@
repositoryURL = "https://github.com/EmergeTools/SnapshotPreviews-iOS"; repositoryURL = "https://github.com/EmergeTools/SnapshotPreviews-iOS";
requirement = { requirement = {
kind = exactVersion; kind = exactVersion;
version = 0.7.6; version = 0.10.21;
}; };
}; };
/* End XCRemoteSwiftPackageReference section */ /* End XCRemoteSwiftPackageReference section */

View file

@ -109,21 +109,21 @@ struct ExampleList: View {
} }
} }
struct PresentInfoAction { struct PresentInfoAction: Sendable {
var action: (any Example.Type) -> () var action: @MainActor (any Example.Type) -> ()
init(action: @escaping (any Example.Type) -> Void) { init(action: @escaping @MainActor (any Example.Type) -> Void) {
self.action = action self.action = action
} }
func callAsFunction<T: Example>(_ type: T.Type) { @MainActor func callAsFunction<T: Example>(_ type: T.Type) {
action(type) action(type)
} }
} }
extension EnvironmentValues { extension EnvironmentValues {
struct PresentInfoActionKey: EnvironmentKey { struct PresentInfoActionKey: EnvironmentKey {
static var defaultValue: PresentInfoAction? = nil static let defaultValue: PresentInfoAction? = nil
} }
var presentInfoAction: PresentInfoAction? { var presentInfoAction: PresentInfoAction? {

View file

@ -22,7 +22,7 @@ let package = Package(
dependencies: [ dependencies: [
// Dependencies declare other packages that this package depends on. // Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"), // .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/EmergeTools/SnapshotPreviews-iOS", exact: "0.7.6") .package(url: "https://github.com/EmergeTools/SnapshotPreviews-iOS", exact: "0.10.21")
], ],
targets: [ targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite. // 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(
.testTarget( .testTarget(
name: "PowTests", name: "PowTests",
dependencies: ["Pow"]), dependencies: ["Pow"]),
] ],
swiftLanguageVersions: [.v5]
) )