Presenting the system share sheet from a full ImmersiveSpace on visionOS 26

We are building a visionOS 26 app (deployment target visionOS 26.0). Inside a full immersive space, the user takes a spatial photo. The photo is shown on a RealityView attachment. We need the system share sheet( AirDrop, Messages, Mail, Copy, Save Image, and the item preview with Done) to appear when the user taps Share on that attachment.

The immersive space is:

ImmersiveSpace(id: "ImmersiveView") {
ImmersiveView()
}
.immersionStyle(selection: $panoImageView, in: .full)
.upperLimbVisibility(.visible)
The review UI is a RealityView attachment, not a window:

Attachment(id: "panoramaFrameCaptureReview") {
PanoramaFrameCaptureReviewView(model: frameCapture) {
guard let path = frameCapture.shareURL?.path else { return }
dismissWindow(id: "PanoramaPhotoShare")
Task { @MainActor in
try? await Task.sleep(nanoseconds: 180_000_000)
openWindow(id: "PanoramaPhotoShare", value: path)
}
}
}
The shared item is a stereo HEIC written with Image I/O (kCGImagePropertyGroupTypeStereoPair, left/right images, HEIF camera extrinsics and SimplifiedPinhole intrinsics). The same data displays correctly with ImagePresentationComponent and saves to Photos as a spatial photo. Share is the only part that fails.

Attempt 1. ShareLink on the attachment

Tapping Share does nothing. On entry to the immersive space the system logs:

Presentations are not currently supported in Immersive contexts.

Attempt 2. UIActivityViewController from the attachment’s hosting controller

let activity = UIActivityViewController(activityItems: [fileURL], applicationActivities: nil)
var presenter: UIViewController = self
while let parent = presenter.parent { presenter = parent }
presenter.present(activity, animated: true)
presenter is UIHostingController<RootView>. The console then says:

Skipping popover presentations transition, missing window or scene for <UIActivityViewController>.
Failed to request default share mode for fileURL:...heic error:Error Domain=NSOSStatusErrorDomain Code=-10814
No share UI appears. presentedViewController is non-nil, so a “did it present?” check does not detect the failure.

Attempt 3. A real WindowGroup whose only job is to present UIActivityViewController

WindowGroup(id: "PanoramaPhotoShare", for: String.self) { path in
if let path = path.wrappedValue {
PanoramaPhotoShareWindow(path: path)
}
}
.windowStyle(.plain)
.defaultSize(width: 20, height: 20)
.defaultWindowPlacement { _, _ in
WindowPlacement(.utilityPanel)
}

struct PanoramaPhotoShareWindow: View {
let path: String
@Environment(.dismissWindow) private var dismissWindow
var body: some View {
PanoramaPhotoSharePresenter(url: URL(fileURLWithPath: path)) {
dismissWindow(id: "PanoramaPhotoShare")
}
.frame(width: 8, height: 8)
.background(.clear)
}
}
final class PanoramaPhotoShareController: UIViewController {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
guard view.window != nil, let url else { return }
let activity = UIActivityViewController(activityItems: [url], applicationActivities: nil)
activity.completionWithItemsHandler = { _, _, _, _ in self.onFinish?() }
present(activity, animated: true)
}
}
Tapping Share opens this window and the app crashes immediately. We removed the feature so users are not crashed. An earlier build that also put a ShareLink in that window logged:

Attempt to present <UIActivityViewController> on <UIHostingController<...PanoramaPhotoShareWindow...>> which is already presenting <UIActivityViewController>.
Question

What is the supported way, on visionOS 26, to present the system share sheet while a .full ImmersiveSpace stays open? If a window is required, how should that window present the sheet without crashing, and without showing a second window that only contains another Share button?

Hello @Travel_Immersive, thank you for your question!

The system share sheet cannot be presented from inside an Immersive Space. Your attachment is part of that space, so the Share button in it can't open the sheet.

The share sheet has to open from a window. Put a ShareLink in that window, and give it a Transferable item for your HEIC (a FileRepresentation works for a file) and a SharePreview for the photo.

To avoid a second window that only shows the share button, you may want to consider putting the ShareLink in the first window your app shows or the window that opened the immersive space initially.

If you want the share sheet to open directly from the attachment, I highly recommend sending us feedback using Feedback Assistant, and see Bug Reporting: How and Why? for tips on sending feedback. If you post the feedback number here, I can make sure the right people see it.

Let me know if you have any questions. Thank you!