WKCookieWebView
WKCookieWebView copied to clipboard
Fixed main thread checker errors.
This PR fixes the issue which can be reproduced by the following steps:
Product -> Scheme -> Edit Scheme -> Diagnostics -> Runtime API Checking
Then Check MainThreadChecker check checkbox as shown on the following screenshot below.
Run the app
The following main thread errors will be observed
Additionally, I have addressed one of the issue which might occur when using websiteDataStore.httpCookieStore
, which requires to be used on the main thread,
To fix the issue, I simply Dispatched calls to websiteDataStore.httpCookieStore.
to the main queue and dispatched a call to URLAuthenticationChallenge
to the background thread. This effectively resolved the mentioned issues.
Feel free to add or request any necessary changes before merging thanks :)