title: Play Music during Phone Calls iOS Swift
body: <p>I would like to be able to play a song during a call in my iPhone, so that the person I'm talking with and I can listen to some songs while the call is going on. Something like that already exists but is only for jailbroken devices, and is called MusicTransport <a href="http://moreinfo.thebigboss.org/moreinfo/depiction.php?file=musictransportDp" rel="nofollow">http://moreinfo.thebigboss.org/moreinfo/depiction.php?file=musictransportDp</a>.</p>
  
  <p>Unfortunately I'm running iOS 9.2.1 on my device and there is no jailbreak yet for it. I'd like to develop an application like this for unjailbroken users so that everybody can use it. </p>
  
  <p>The code for making a call is this:</p>
  
  <pre><code>var url:NSURL = NSURL(string: "tel://123654789")
  UIApplication.sharedApplication().openURL(url)
  </code></pre>
  
  <p>According to the Apple Developer website, we can use MPMusicPlayerController in order to play media items from the device Music library <a href="https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMusicPlayerController_ClassReference/" rel="nofollow">https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMusicPlayerController_ClassReference/</a>.</p>
  
  <p>What can I do to "stream" or play a song directly to the call?</p>