WKCookieWebView icon indicating copy to clipboard operation
WKCookieWebView copied to clipboard

Fixed main thread checker errors.

Open MussaCharles opened this issue 1 year ago • 0 comments

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. Screenshot 2023-08-04 at 9 22 33 AM Run the app The following main thread errors will be observed Screenshot 2023-08-04 at 9 10 39 AM

Additionally, I have addressed one of the issue which might occur when using websiteDataStore.httpCookieStore, which requires to be used on the main thread,

Screenshot 2023-08-04 at 8 31 11 AM

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 :)

MussaCharles avatar Aug 04 '23 00:08 MussaCharles