title: get all the songs from music library ios swift 3 xcode 8.2.1
body: <p>i wanna get all the songs from music library and show in my table view and then select multiple songs in table view and play in AVAudioPlayer. but i am unable to get songs from music library and show in my table view.i visit many links but did not work for me, please help me. here is my code</p>
  
  <pre><code>@IBAction func selectMusicFromGallery(_ sender: Any) 
  {
      mediaPicker = MPMediaPickerController(mediaTypes: .music)
      mediaPicker.allowsPickingMultipleItems = false
      mediaPicker.delegate = self
     // mediaPicker.prompt = "Select Songs"
      self.present(mediaPicker, animated: true, completion: nil)
  }
  
  func mediaPicker(_ mediaPicker: MPMediaPickerController, didPickMediaItems mediaItemCollection: MPMediaItemCollection) 
  {
      let mediaItems = MPMediaQuery.songs().items
      let mediaCollection = MPMediaItemCollection(items: mediaItems!)
      let player = MPMusicPlayerController.systemMusicPlayer()
      player.setQueue(with: mediaCollection)
      player.play()
  }
  </code></pre>