Skip to content

Commit b738624

Browse files
author
JWI
committed
Commented out all concurrency, for some reason the app has some kind of weak dependency on it
1 parent eb2e18e commit b738624

File tree

7 files changed

+17
-13
lines changed

7 files changed

+17
-13
lines changed

Sources/SwiftCrossUI/Environment/Actions/PresentAlertAction.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public struct PresentAlertAction {
88
let environment: EnvironmentValues
99

1010
// MARK: - iOS 13+ version with async/await
11-
@available(iOS 13.0, *)
11+
/*@available(iOS 13.0, *)
1212
@discardableResult
1313
public func callAsFunction(
1414
_ title: String,
@@ -43,7 +43,7 @@ public struct PresentAlertAction {
4343
}
4444

4545
return await presentAlert(backend: environment.backend)
46-
}
46+
}*/
4747

4848
// MARK: - iOS 12 and below version with completion handler
4949
@discardableResult

Sources/SwiftCrossUI/Environment/Actions/PresentFileSaveDialogAction.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public struct PresentFileSaveDialogAction: Sendable {
66
let backend: any AppBackend
77
let window: MainActorBox<Any?>
88

9-
@available(iOS 13, *)
9+
/*@available(iOS 13, *)
1010
public func callAsFunction(
1111
title: String = "Save",
1212
message: String = "",
@@ -53,7 +53,7 @@ public struct PresentFileSaveDialogAction: Sendable {
5353
}
5454

5555
return await chooseFile(backend: backend)
56-
}
56+
}*/
5757

5858
// MARK: - iOS 12 and below version with completion handler
5959
public func callAsFunction(

Sources/SwiftCrossUI/Environment/Actions/PresentSingleFileOpenDialogAction.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public struct PresentSingleFileOpenDialogAction {
88
let window: MainActorBox<Any?>
99

1010
// MARK: - iOS 13+ async/await version
11-
@available(iOS 13.0, *)
11+
/*@available(iOS 13.0, *)
1212
public func callAsFunction(
1313
title: String = "Open",
1414
message: String = "",
@@ -56,7 +56,7 @@ public struct PresentSingleFileOpenDialogAction {
5656
}
5757

5858
return await chooseFile(backend: backend)
59-
}
59+
}*/
6060

6161
// MARK: - iOS 12 and below version with completion handler
6262
public func callAsFunction(

Sources/SwiftCrossUI/Views/Modifiers/Lifecycle/OnDisappearModifier.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ class OnDisappearModifierChildren: ViewGraphNodeChildren {
8989

9090
deinit {
9191
if #available(iOS 13, *) {
92-
Task { @MainActor [action] in
92+
/*Task { @MainActor [action] in
9393
action()
94-
}
94+
}*/
9595
} else {
9696
DispatchQueue.main.async {
9797
self.action()

Sources/SwiftCrossUI/Views/Modifiers/Lifecycle/TaskModifier.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//MARK: Is this needed? This seems to be the worst offender in terms of compatibility.
22

3-
@available(iOS 13, *)
3+
/*@available(iOS 13, *)
44
extension View {
55
/// Starts a task before a view appears (but after ``View/body`` has been
66
/// accessed), and cancels the task when the view disappears. Additionally,
@@ -64,4 +64,4 @@ extension TaskModifier: View {
6464
task?.cancel()
6565
}
6666
}
67-
}
67+
}*/

Tests/SwiftCrossUITests/PublisherTests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ struct PublisherTests {
6262
#expect(!observedChange, "Expected mutation not to trigger cancelled observation")
6363
}
6464

65+
66+
/*
6567
#if canImport(AppKitBackend)
6668
// TODO: Create mock backend so that this can be tested on all platforms. There's
6769
// nothing AppKit-specific about it.
@@ -118,5 +120,5 @@ struct PublisherTests {
118120
"""
119121
)
120122
}
121-
#endif
123+
#endif*/
122124
}

Tests/SwiftCrossUITests/SwiftCrossUITests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ struct SwiftCrossUITests {
6969

7070
return original == decoded
7171
}
72-
72+
73+
74+
/*
7375
#if canImport(AppKitBackend)
7476
@Test("Ensure that a basic view has the expected dimensions under AppKitBackend")
7577
@MainActor
@@ -129,5 +131,5 @@ struct SwiftCrossUITests {
129131

130132
return data
131133
}
132-
#endif
134+
#endif*/
133135
}

0 commit comments

Comments
 (0)