RelevantEntities
A type you use to donate your app’s songs, albums, artists, and other media items to play during workouts.
Declaration
struct RelevantEntitiesMentioned in
Overview
Use the shared RelevantEntities object to donate songs, albums, artists, playlists, radio stations, podcasts, or other media-related content to the system. Base your donations on whatever criteria make sense for your app. For example, you might donate songs that someone listens to frequently or donate new items that you think someone might like based on their tastes. The system uses your donations to offer suggestions for content someone can play during a workout or other scenario.
When you donate media items using this type, provide all the items at once using the updateEntities(_:for:) method. Apps provide only one set of suggestions at a time, and those suggestions remain active until you clear them. Each time you call the updateEntities(_:for:) method, the system replaces your app’s previous suggestions with the new set. If you don’t have any suggestions, you can specify an empty array when calling the method. If someone doesn’t launch your app, the system automatically expires your app’s suggestions after approximately four weeks.