Screen record restriction in MacOS app

I have a MacOs AppKit app. This app we are developing for examination purposes. We dont want the user to screen record and also to take screen shot.

We created a window and set the sharingType to none. also we have set window.level to CGShieldingWindowLevel()

Below is the code if let window = NSApp.windows.first { window.title = "Test" window.sharingType = .none // Disable screen capture and recording window.level = NSWindow.Level(rawValue: Int(CGShieldingWindowLevel())) // }

As per documentation the windows should be excluded from screen capture and also recording

But the window is excluded only from screen capture and not from screen recording. Please give us a solution to prevent screen recording in MacOs native app.

Answered by DTS Engineer in 818352022

This app we are developing for examination purposes.

You should use Automatic Assessment Configuration, as it is purpose built for your needs.

—Ed Ford,  DTS Engineer

It is worth remembering that there is nothing stopping someone pointing a phone camera at the screen and recording it that way.

@apple team can you pls check and help us to fix the issue. Why (window.sharingType = .none) does not prevent screen recording? Am I making any issue in code?

This app we are developing for examination purposes.

You should use Automatic Assessment Configuration, as it is purpose built for your needs.

—Ed Ford,  DTS Engineer

Screen record restriction in MacOS app
 
 
Q