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:
build:
runs-on: macos-13
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@v3
- 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
env:
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_TOKEN }}

2
.gitignore vendored
View file

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

View file

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

View file

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

View file

@ -22,7 +22,7 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .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 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(
name: "PowTests",
dependencies: ["Pow"]),
]
],
swiftLanguageVersions: [.v5]
)