I've had to ditch the SwiftUI app lifecycle due to this issue: https://developer.apple.com/forums/thread/742580
After creating a new UIKit document app as a test, it doesn't have a toolbar when opening the document. How can I add one along the lines of https://developer.apple.com/wwdc22/10069 ?
The UIDocumentViewController
isn't already embedded in a UINavigationController
it seems.
To reproduce: New Project -> iOS -> Document App. Select Interface: Storyboard. Add an empty "untitled.txt" resource to the project. Change the first line in documentBrowser(_:,didRequestDocumentCreationWithHandler:)
to
let newDocumentURL: URL? = Bundle.main.url(forResource: "untitled", withExtension: "txt")