VideoPlayer crashes in Xcode Preview for macOS app

I think I have the simplest possible Mac app trying to see if I can have VideoPlayer work in an Xcode Preview. It works in an iOS app project. In a Mac app project it builds and runs. But if I preview in Xcode it crashes.

The diagnostic says:

    |  [Remote] Unknown Error: The operation couldn’t be completed. XPC error received on message reply handler
    |  
    |  BSServiceConnectionErrorDomain (3):
    |  ==NSLocalizedFailureReason: XPC error received on message reply handler
    |  ==BSErrorCodeDescription: OperationFailed

The code I'm using is the exact code from the VideoPlayer documentation page. See this link.

Any ideas about this XPC error, and how to work around?

I'm using Xcode 16.0 on macOS 14.6.1

Hello @olson,

I am able to successfully see a Preview using that code in a macOS target on Xcode 16.1 beta and macOS 15.

Can you provide your Xcode project?

Best regards,

Greg

Hi Greg,

Thanks for trying that. I tried out Xcode 16.1RC just now - still on macOS 14.6.1 - but no luck.

Here's a link to my test project.

VideoPlayer crashes in Xcode Preview for macOS app
 
 
Q