Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Dependencies/DependencyValues/OpenURL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

@available(iOS 14, macOS 11, tvOS 14, watchOS 7, *)
private enum OpenURLKey: DependencyKey {
static let liveValue = OpenURLEffect { url in
static let liveValue = OpenURLEffect { @MainActor url in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
static let liveValue = OpenURLEffect { @MainActor url in
// NB: This must be annotated '@MainActor' to avoid a Swift bug:
// https://github.com/pointfreeco/swift-dependencies/discussions/301
static let liveValue = OpenURLEffect { @MainActor url in

let stream = AsyncStream<Bool> { continuation in
let task = Task { @MainActor in
#if os(watchOS)
Expand Down