IOS custom plugin to print WebKit to pdf

I need a custom plugin to download the WebKit view to pdf. Does anyone know how should be the IOS native code in the Swift file for to this? Thanks

Hi. I’m getting this error

Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 “target is not running or doesn’t have entitlement com.apple.runningboard.assertions.webkit” UserInfo={NSLocalizedFailureReason=target is not running or doesn’t have entitlement com.apple.runningboard.assertions.webkit}>