For more information:
In this link, it says
Activity activation
If your app implements a custom SharePlay button, confirm that your app supports initiating an activity when there isn’t an active FaceTime call. For visionOS, update the button’s action handler to always call activate(), which now presents the new Share Window menu, and remove any checks for isEligibleForGroupSession that guard activating the activity.
So for GuessTogether, I changed the code in SharePlayButton.swift to:
Button(text, systemImage: "shareplay") {
Task.detached {
do {
_ = try await activity.activate()
} catch {
print("Error activating activity: \(error)")
Task { @MainActor in
isActivationErrorViewPresented = true
}
}
}
}
.tint(.green)
This should bring up the Share menu right? However, this button does nothing.
Topic:
Spatial Computing
SubTopic:
General
Tags: