How to add webkit entitlement in iOS project

Viewed 194

I have an iOS app project. Recently I added a view controller with WebKit WKWebView.

 class MyViewController: UIViewController
 {
    // MARK: - IBOutelets
    @IBOutlet weak var webView: WKWebView!
    
    override func viewDidLoad() {
      super.viewDidLoad()
      let url = aboutURL
      webView.loadFileURL(
        url,
        allowingReadAccessTo: url)
      let request = URLRequest(url: url)
      webView.load(request)
   }
 }

I run the app on my iPhone from Xcode. Then in the console,I saw the following error messages.

 ProcessAssertion: Failed to acquire RBS assertion 'WebProcess Suspended Assertion'
 for process with PID=91330, error: 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}>

The error appears only at the time I close the view controller with webkit view.

It looks like that I missed to add webkit entitlement in my project? However, I could not find a way in my project settings, none in Signing & Capability tab.

Anyway to resolve the issue? Appreciated any help!

My Xcode is Version 13.4.1

0 Answers
Related