diff --git a/Sources/LNPopupUI/LNPopupUI.swift b/Sources/LNPopupUI/LNPopupUI.swift index bc99111..b2f7312 100644 --- a/Sources/LNPopupUI/LNPopupUI.swift +++ b/Sources/LNPopupUI/LNPopupUI.swift @@ -9,9 +9,11 @@ import SwiftUI import LNSwiftUIUtils @_exported import LNPopupController -@MainActor @available(iOS 14.0, *) public extension ToolbarItemPlacement { +#if swift(>=6.0) + @MainActor +#endif static let popupBar: ToolbarItemPlacement = .bottomBar } diff --git a/Sources/LNPopupUI/Private/LNPopupEnvironment.swift b/Sources/LNPopupUI/Private/LNPopupEnvironment.swift index 4fce36e..6443cce 100644 --- a/Sources/LNPopupUI/Private/LNPopupEnvironment.swift +++ b/Sources/LNPopupUI/Private/LNPopupEnvironment.swift @@ -8,7 +8,9 @@ import SwiftUI import LNPopupController +#if swift(>=6.0) @MainActor +#endif internal final class LNPopupEnvironmentConsumer { private let wrapped: T private unowned var consumer: AnyObject? = nil