개요

With the Group Activities framework, you can provide your app’s content in SharePlay experiences …

synchronize your app’s behavior with other participating devices.

The Group Activities framework uses end-to-end encryption on all session data that the GroupSession object synchronizes between devices.


간단한 SharePlay 예제

  1. the entitlements 설정

    스크린샷 2023-11-28 오후 11.58.10.png

스크린샷 2023-11-29 오후 3.03.34.png

  1. custom activity instance 정의
struct SharePlay: GroupActivity {
    
    var metadata: GroupActivityMetadata {
        var metadata = GroupActivityMetadata()
        metadata.title = "SharePlay Title" // 제목
        metadata.subtitle = "SharePlay SubTitle" //부제
        metadata.type = .generic //GroupActivity의 유형
        metadata.previewImage = UIImage(systemName: "person")?.cgImage //이미지
        
        return metadata
    }

}