-
What's new in SharePlay
Join us as we share the latest updates to SharePlay. We'll show you how you can start SharePlay sessions right from your app, take you through improvements to APIs to create richer experiences, and check out enhancements to GroupSessionMessenger. We'll also explore best practices for adding SharePlay to your app.
Ressources
Vidéos connexes
WWDC23
WWDC22
-
Rechercher dans cette vidéo…
-
-
2:06 - Register GroupActivity
// Register GroupActivity let itemProvider = NSItemProvider() itemProvider.registerGroupActivity(WatchTogether()) // Provide the ItemProvider to the ShareSheet let configuration = UIActivityItemsConfiguration(itemProviders: [itemProvider]) UIActivityViewController(activityItemsConfiguration: configuration) -
2:14 - Not as prominent
let shareSheet = UIActivityViewController(activityItemsConfiguration: configuration) // Show SharePlay non-prominently shareSheet.allowsProminentActivity = false -
2:15 - Exclude
let shareSheet = UIActivityViewController(activityItemsConfiguration: configuration) // Exclude SharePlay activity shareSheet.excludedActivityTypes = [.sharePlay] -
2:44 - Show your own button to start SharePlay
let controller = GroupActivitySharingController(WatchTogetherActivity()) present(controller, animated: true) -
8:21 - Stroke Gesture
var strokeGesture: some Gesture { DragGesture() .onChanged { value in canvas.addPointToActiveStroke(value.location) } .onEnded { value in canvas.addPointToActiveStroke(value.location) canvas.finishStroke() } }
-