iOS Swift: run screen recording programmatically

Is it possible to start screen recording (through Control Center) without user prompt?

I mean to ask user permission for the first time and after that to start and stop recording programmatically only?

I need to record screen only for specific events.
Please take a look at ReplayKit's RPScreenRecorder: https://developer.apple.com/documentation/replaykit/rpscreenrecorder
I ask about iPhone screen recording (not only specific application).

Description of RPSScreenRecorder: The shared recorder object providing the ability to record audio and video of your app.

So, it isn't what I need
Allowing an app to record the entire screen even when it's in the background would pose serious privacy implications. If you require a screen recording in your app, you can ask users to do it in Control Center and then import the video into your app.

I am also trying not to show the permission alert prompt while recording in app but still after a lot of efforts no luck....

So the documentation here is still outdated https://developer.apple.com/documentation/replaykit/rpscreenrecorder/startrecording(handler:)?

This alert window is also presented if it has been longer than 8 minutes since the last time startRecording(handler:) was called.

It was working (didn't ask within 8 minutes) for me on early iOS 18s, but then later (iOS 18.5 + 26) stopped working (asking every time).

iOS Swift: run screen recording programmatically
 
 
Q