Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed main thread checker errors. #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MussaCharles
Copy link

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.

None yet

1 participant