Contents

appEntityIdentifiers

The entities that represent this content, making them available to Siri and Apple Intelligence.

Declaration

var appEntityIdentifiers: [EntityIdentifier] { get set }

Discussion

Associate one or more EntityIdentifier values with the content so the system can connect the currently playing media to your app’s AppEntity types.

var content: any MediaContentRepresentable {
    var musicContent = MusicContent(id: song.id, songTitle: song.title, artistName: song.artist)
    musicContent.appEntityIdentifiers = [EntityIdentifier(for: SongEntity.self, identifier: song.id)]
    return musicContent
}