0

I am adding AVPlayerViewController in storyboard, but when I run the app I get this error iOS device or simulator.

Unknown class AVPlayerViewController in Interface Builder file.

How do I fix it?

Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
  • Your question is unclear to me. Maybe you have added **AVPlayerViewController** wrong way. you can check this [link](http://www.techotopia.com/index.php/IOS_8_Video_Playback_using_AVPlayer_and_AVPlayerViewController) – Imrul Kayes Oct 01 '17 at 09:29

1 Answers1

0

I found the issue. The issue was I was using @import AVKit in the code but there wasn't a single line in the code that initialized AVPlayerViewController, so effectively AVKit was not imported at runtime which caused warning of unknown class when loading Xib containing AVPlayerViewController.

Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131