I try to play a video using a MPMoviePlayerController. The setup is: I push a new ViewController, then set up the view and the movie player instance in viewDidLoad and then use
I am not sure if this was a bug in the Swift betas or iOS 8 betas, but changing the code to use AVPlayer worked.
import AVFoundation
import AVKit
let playerViewController = AVPlayerViewController()
// In async block:
if let player = AVPlayer.playerWithURL(url) as? AVPlayer {
playerViewController.player = player
}