You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I'm not sure if you're aware (because I assume native macOS devs are rarer compared to iOS ones), but it seems the OpenURL Dependency is a no-op in macOS. I'm not entirely sure why but a quick repro and video:
Repro is a vanilla SwiftUI project wit only swift-dependencies and the following code:
structContentView:View{@Dependency(\.openURL)privatevardepOpenURL@Environment(\.openURL)privatevarenvOpenURLvarbody:someView{VStack{Button("Open via @Dependency"){Task{awaitdepOpenURL(URL(string:"https://riverside.fm")!)}}Button("Open via @Environment"){envOpenURL(URL(string:"https://riverside.fm")!)}}.padding(40)}}
openurl-mac.mov
Checklist
I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
If possible, I've reproduced the issue using the main branch of this package.
Description
Hey, I'm not sure if you're aware (because I assume native macOS devs are rarer compared to iOS ones), but it seems the OpenURL Dependency is a no-op in macOS. I'm not entirely sure why but a quick repro and video:
Repro is a vanilla SwiftUI project wit only swift-dependencies and the following code:
openurl-mac.mov
Checklist
mainbranch of this package.Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
Dependencies version information
No response
Destination operating system
No response
Xcode version information
No response
Swift Compiler version information