According to Developer Tech Support, the local documents folder only shows up if there is a document in it. It's easy to test: when you delete all the local docs, the folder disappears. Interestingly, the user can also move a doc to the local folder, causing it to show up again.Anyone know why it works this way? Super confusing.
Post
Replies
Boosts
Views
Activity
This seems to work, but I'm not sure how brittle it is:
for window in UIApplication.shared.windows where window.isKeyWindow {
		window.rootViewController?.dismiss(animated: true, completion: nil)
		break
}
And as far as my trails, the ReferenceFileDocument cannot trigger any write operation :(*. You have to call registerUndo on the UndoManager in the environment to trigger a save:
@Environment(\.undoManager) var undoManager
I'm guessing right now the best you can do is present the onboarding when the user opens/creates a document for the first time. Not so bad really.
@Graphics and Games Engineer I'm using this for my payload for both intersection functions:
typedef struct {
vector_float3 normal;
vector_float3 color;
} IntersectionPayload;
(sorry I can't seem to get the code block to render correctly). It just returns the surface normal and color from the intersection function. I think that's a trivial usage.
Feedback is FB12834920. Thanks!
Sorry, I don't have a sample project.
DTS confirmed that the rejection was an error.
@julia_brockovich iOS. Seems to do the right thing on macOS (I just created a test project)
@julia_brockovich FB13439586
I found the sample code for the WWDC video (https://developer.apple.com/documentation/uikit/app_and_environment/supporting_desktop-class_features_in_your_ipad_app), but having trouble figuring out which part actually creates the toolbar.
Ok seems I have to change presentDocument to:
func presentDocument(at documentURL: URL) {
let navVC = UINavigationController()
let doc = Document(fileURL: documentURL)
let docVC = UIDocumentViewController(document: doc)
navVC.modalPresentationStyle = .fullScreen
navVC.addChild(docVC)
present(navVC, animated: true, completion: nil)
}
So embed the UIDocumentViewController inside a UINavigationController.