Post

Replies

Boosts

Views

Activity

AV PlayerView + Interface Builder + Archive Build Error
If you add an AVPlayerView into a window in your StoryBoard, it will hang your app on launch, but not in Xcode. Only in the release builds for the app store.Here are the steps to reproduce:1. Create a new storyboard project in Xcode.2. Add AVKit Player View to your main window.3. If you run the app from Xcode, everything works fine.4. Build the archive version for deployment to the App Store.5. Run the app from the archive. It freezes the window drawing process6. If you add some debug code, you'll find it hangs in the loadView() of NSViewController of the default ViewController class. That method never exits.If you look at the console output of the release build, you will see this message:Failed to set (contentViewController) user defined inspected property on (NSWindow): *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (AVPlayerView) for key (NS.objects) because no class named "AVPlayerView" was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target). If the class was renamed, use setClassName:forClass: to add a class translation mapping to NSKeyedUnarchiverFor the Xcode debug build, you see this:-[AVPlayerView initWithCoder:] 365 0x102031800I noticed this problem when I was updating an app with a minor change, it worked just fine in Xcode, so I submitted it to the app store and it was rejected because of a blank screen.
2
0
617
Jun ’20