ScreenCaptureKit crashes on Mac Catalyst apps

I'm trying to use ScreenCaptureKit on a Mac Catalyst app, on macOS 12.5.1. I'm not sure if I'm doing something wrong, but it crashes as soon as I try to request SCShareableContent. It crashes on internal code, calling a method it can't find, which makes me think this is a bug in the framework rather than incorrect configuration.

Any hints on how to work around this problem?

The crash is:

** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RPDaemonProxy fetchShareableContentWithOption:windowID:withCompletionHandler:]: unrecognized selector sent to instance 0x6000037d5dc0'

terminating with uncaught exception of type NSException

  • I filed this as FB11451378. In the mean time I'd appreciate any pointers on how to get this working. Some potential workarounds I'm considering are using an older API for screen capture, or make a small helper XPC service in native macOS code that'd do the capturing, but it'll probably be more complex than it needs to be.

Add a Comment