Open new document in SwiftUI on iOS

I'm trying to use

@Environment(\.openDocument) private var openDocument

but it seems to only be available on macOS.

How can I open a document programmatically on iOS? My app has a custom interface for browsing and opening files, so that a tapped file should be shown in the current window, replacing the current file if it exists.

Answered by Frameworks Engineer in 790741022

Currently, a document can not be opened programmatically on iOS.

Currently, a document can not be opened programmatically on iOS.

Open new document in SwiftUI on iOS
 
 
Q