title: Video playing on xcode simulator but not on device
body: <p>I had created a page for my project that has a video (2.1 Mb/480p) that plays on loop. The video plays on my simulator, but not when I'm sideloading the app onto an iPhone device. I've checked out multiple posts with the same question but none of the solutions have worked for me so far. What could be causing this issue? How can I resolve it? </p>
  
  <p>My video is stored locally. Here is the relevant source code that plays my video:</p>
  
  <pre><code>override func viewDidAppear(animated: Bool) {
  
          let fileUrl = NSURL(fileURLWithPath: "/Users/User/Desktop/Project_XYZ/Pultz/11005472.mp4")
          playerView = AVPlayer(URL: fileUrl)
  
          let playerLayer = AVPlayerLayer(player: playerView)
          playerLayer.frame = videoContainer.frame
          playerLayer.videoGravity = AVLayerVideoGravityResizeAspectFill
  
  
          //playerViewController.player = playerView
  
          self.view.layer.addSublayer(playerLayer)
          playerView.play()
  
          NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(WorkoutDashboardViewController.restart), name: AVPlayerItemDidPlayToEndTimeNotification, object: self.playerView.currentItem)
  
      }
  </code></pre>
  
  <p>P.S. The video I'm using is a free watermarked vid I got off the internet. Could this be a probable cause?</p>