Show native share sheet (UIActivityViewController) from Unity VR app?

We are creating a fully immersive VR app with Unity, but we want to present a native visionOS “share sheet” so users can share URLs and images from our app.

We have a native plugin set up, so selecting a button in the app can run a Swift method. I’m just having trouble presenting the UIActivityViewController.

On iOS we’re doing it successfully with this method:

public func shareImage(filepath: String, message: String) {
        guard let viewController =,
              let imageData = NSData(contentsOf: URL(fileURLWithPath: filepath)),
              let image = UIImage(data: imageData as Data) else { return }
        let shareSheet = UIActivityViewController(activityItems: [image, message], applicationActivities: nil)
        viewController.present(shareSheet, animated: true, completion: nil)

but I don’t have a good understanding of how scenes/windows work in visionOS and how to properly present.

Any solutions / suggestions / alternatives much appreciated!