I have problems to join a share play group session programmatically.
First I create on one device a SharePlay Activity
await SharePlayGame().activate()
If this was successful the creator listen to the session
private func startSession() async {
for await session in SharePlayGame.sessions() {
configureGroupSession(session) // do session stuff
}
}
This is working so far. Now the second device will join. I call just startSession
But then nothing happens. My assumption was that the created session is shared by SharePlay
or the FaceTime connection.
Anyway, when I open FaceTime I see that there is an open session. FaceTime offers me the action to join the GroupSession. If I press this everything work fine and my devices are connected (see image). Any further events between this devices are working as expected.
When I use await SharePlayGame().activate()
for the joining process a new SharePlay Group Session is created. This always show the system dialog ("Do you want replace the current SharePlay Session?") Then my code works, too, but this cannot be the right way.
How is the correct way to join (or find?) the GroupSession and join.
Ok, I found it out. At the moment it seems that this is not possible. I watched all WWDC videos and check the whole documentation. I tried a lot of other apps from big players and everybody join the session by FaceTime.
Edit: I read in the release notes for 15.4 that it's now possible. But I did not find any iOS docu.