What is the recommended architecture for a native iPadOS application that automatically creates an interactive external workspace on a connected display while preserving pointer interaction and allowing custom layouts?
Dear Pankaj,
Please see the following resources for supporting scenes on external displays:
https://developer.apple.com/documentation/uikit/presenting-content-on-a-connected-display
https://developer.apple.com/documentation/uikit/specifying-the-scenes-your-app-supports
https://developer.apple.com/documentation/metal/managing-your-metal-app-window-in-ipados
Sample project: https://developer.apple.com/documentation/uikit/building-a-desktop-class-ipad-app
While these are geared towards UIKit, there is analogous API support in SwiftUI for scenes, e.g.:
https://developer.apple.com/documentation/swiftui/view/sceneaccessory(content:)
https://developer.apple.com/documentation/swiftui/externalnoninteractiveaccessory
In SwiftUI, you would pass to sceneAccessory(content:) a Window or WindowGroup to create an interactive window on an external display. For a document-based app you'd use a DocumentGroupLaunchScene or DocumentGroup. Please note that, again, you can only display interactive windows on connected external displays for certain iPad models.
Hoping this helps,
Richard Yeh Developer Technical Support