Volumetric window not sharing in SharePlay session for VisionOS

I've been struggling with this for far too long so I've decided to finally come here and see if anyone can point me to the documentation that I'm missing. I'm sure it's something so simple but I just can't figure it out.

I can SharePlay our test app with my brother (device to device) but when I open a volumetric window, it says "not shared" under it. I assume this will likely fix the video sharing problem we have as well. Everything else works so smooth but SharePlay has just been such a struggle for me. It's the last piece to the puzzle before we can put it on the App Store.

This is what i mean:

Hi @El_Gato_Luchador ,

Not sure if you've solved this yet, but hopefully I can help!

Try using the .groupActivityAssociation modifier on your windows and conditionally switch the primary window when you open and close the volumetric window. There's actually a specific example of this case in the documentation, which I'll paste below:

@State var activityState: ActivityState


var body: some Scene {
    WindowGroup {
        TeamSelectionView()
            .groupActivityAssociation(activityState == .teamSelection ? .primary("team-selection") : nil)
    }


    WindowGroup {
        CardGameVolume()
            .groupActivityAssociation(activityState == .inGame ? .primary("in-game") : nil)
    }
    .windowStyle(.volumetric)
}

You can use this to share a specific window, and should no longer need need to use the activityIdentifier with handlesExternalEvents

remember though, you can only share one window at a time.

Let me know if you have any further questions!

Volumetric window not sharing in SharePlay session for VisionOS
 
 
Q