According to a new update in the API document, you can only capture video and audio through your application.

RPScreenRecorder : A generic recorder object that provides the ability to record audio and video of your application.
In this class, you can record the screen of your application, as well as associate Audion with an iPhone microphone.
Below are some methods that you can use to record a screen with various different parameters.
Access to the general recorder:
class func shared()
To manage application recording:
-- Starts recording the app display. func startRecording(handler: ((Error?) -> Void)? = nil) -- Stops the current recording. func stopRecording(handler: ((RPPreviewViewController?, Error?) -> Void)? = nil) -- Starts screen and audio capture. func startCapture(handler: ((CMSampleBuffer, RPSampleBufferType, Error?) -> Void)?, completionHandler: ((Error?) -> Void)? = nil) -- Stops screen capture func stopCapture(handler: ((Error?) -> Void)? = nil)
Hope this helps you capture the screen in your application.
Link Link: https://developer.apple.com/documentation/replaykit/rpscreenrecorder
Doc Ref: https://developer.apple.com/library/content/releasenotes/General/WhatsNewIniOS/Articles/iOS_11_0.html
source share