title: Why this Objective-C code won't play an AVPlayerViewController video?
body: <p><a href="https://i.stack.imgur.com/CTovE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CTovE.png" alt="enter image description here"></a>Both are in viewDidLoad(). 
  What's wrong with this objective-c source file?
  The swift version works like a charm...
  Xcode ver. 8.2  iOS 10</p>
  
  <p>Swift (OK):</p>
  
  <pre><code>        let path : String = Bundle.main.path(forResource: "charlie", ofType: "mp4")!
          let movieurl : URL = URL(fileURLWithPath: path)
          let movie : AVPlayerViewController = AVPlayerViewController()
          movie.view.frame = self.view.bounds
  
          let player : AVPlayer = AVPlayer(url: movieurl)
          movie.player = player
  
          self.view.addSubview(movie.view)
          player.play()
  </code></pre>
  
  <p>Objective-C (Won't show/play the video):</p>
  
  <pre><code>        AVPlayerViewController* movie;
          AVPlayer* player;
  
          NSString *path = [[NSBundle mainBundle]
              pathForResource:@"charlie" ofType:@"mp4"];
  
          NSURL *url = [NSURL URLWithString:path] ;
  
          movie = [[AVPlayerViewController alloc] init];
          movie.view.frame = self.view.bounds;
          player = [[AVPlayer alloc] initWithURL:url];
  
          [movie setPlayer:player];
          [self.view addSubview:movie.view];
  
          [player play];
  </code></pre>