From 10b48d37adbde98405ed676e8fb80d8a8e17c592 Mon Sep 17 00:00:00 2001 From: Mauro <34335419+Velin92@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:24:46 +0200 Subject: [PATCH] Preview tests migration to swift 6.2 (#5786) preview tests now use swift 6.2 --- ElementX.xcodeproj/project.pbxproj | 6 ++++++ PreviewTests/Sources/PreviewTests.swift | 1 - PreviewTests/SupportingFiles/target.yml | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 7e8835a96..b16028be0 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -9602,6 +9602,9 @@ PRODUCT_BUNDLE_IDENTIFIER = "${BASE_BUNDLE_IDENTIFIER}.preview.tests"; PRODUCT_NAME = PreviewTests; SDKROOT = iphoneos; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_VERSION = 6.2; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ElementX.app/ElementX"; }; @@ -10064,6 +10067,9 @@ PRODUCT_BUNDLE_IDENTIFIER = "${BASE_BUNDLE_IDENTIFIER}.preview.tests"; PRODUCT_NAME = PreviewTests; SDKROOT = iphoneos; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_VERSION = 6.2; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ElementX.app/ElementX"; }; diff --git a/PreviewTests/Sources/PreviewTests.swift b/PreviewTests/Sources/PreviewTests.swift index 742398507..37572cee1 100644 --- a/PreviewTests/Sources/PreviewTests.swift +++ b/PreviewTests/Sources/PreviewTests.swift @@ -12,7 +12,6 @@ import Combine import SwiftUI import Testing -@MainActor struct PreviewTests { private struct SnapshotDevice { let name: String diff --git a/PreviewTests/SupportingFiles/target.yml b/PreviewTests/SupportingFiles/target.yml index ef1eb282c..a82a6abe5 100644 --- a/PreviewTests/SupportingFiles/target.yml +++ b/PreviewTests/SupportingFiles/target.yml @@ -41,6 +41,9 @@ targets: base: PRODUCT_NAME: PreviewTests PRODUCT_BUNDLE_IDENTIFIER: ${BASE_BUNDLE_IDENTIFIER}.preview.tests + SWIFT_VERSION: 6.2 + SWIFT_APPROACHABLE_CONCURRENCY: YES + SWIFT_DEFAULT_ACTOR_ISOLATION: MainActor debug: release: