Get current playing song from Spotify iOS app
Here is a solution in Swift 3: let player = MPMusicPlayerController.systemMusicPlayer() if let mediaItem = player.nowPlayingItem { let title: String = mediaItem.value(forProperty: MPMediaItemPropertyTitle) as! String let albumTitle: String = mediaItem.value(forProperty: MPMediaItemPropertyAlbumTitle) as! String let artist: String = mediaItem.value(forProperty: MPMediaItemPropertyArtist) as! String print(“\(title) on \(albumTitle) by \(artist)”) } Note that starting from iOS 10, you must … Read more