Skip to content

Fixed main thread checker errors. - #21

Open
MussaCharles wants to merge 1 commit into
Kofktu:masterfrom
MussaCharles:charles/main-thread-checker
Open

Fixed main thread checker errors.#21
MussaCharles wants to merge 1 commit into
Kofktu:masterfrom
MussaCharles:charles/main-thread-checker

Conversation

@MussaCharles

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant