Old ScreenCaptureKit sample only shows black screen on Sonoma

I have old ScreenCaptureKit sample downloaded on Oct 2022. That sample worked on Oct 2022. But it does not work on Apr 2024 on Sonoma 14.4.1 M1 MacBook. It only shows black screen.

I also download updated ScreenCaptureKit sample and test it. It works on Sonoma 14.4.1 M1 MacBook. I noticed latest sample have SCContentSharingPicker and other changes.

I have my screen capture application based on old ScreenCaptureKit sample. My app only shows black screen.

Do I have to add SCContentSharingPicker and SCContentSharingPickerObserver on my application for capturing screen on Sonoma?

Old way of screen capture without SCContentSharingPicker is not supported anymore on Sonoma?

Old ScreenCaptureKit sample only shows black screen on Sonoma
 
 
Q