Post

Replies

Boosts

Views

Activity

Reply to Any way to check if song is in Library with MusicKit? ?relate=library not working for me
Hi Joe, Thanks for responding! I tripple checked and appleMusic is indeed the identifier of a Song object so not sure what's happening there. As in regards to your second request, here is how I'm currently checking in the MPMediaLibrary func checkInLocalLib(with id: String) {         let query = MPMediaQuery.songs()         let allSongs = query.items! as [MPMediaItem]         if allSongs.isEmpty == false {             let matchedSong = allSongs.filter { $0.playbackStoreID == id }             if matchedSong.isEmpty {                 currentSongInLibrary = false             } else {                 currentSongInLibrary = true             }         }     }
Dec ’21