Skip to content

Main thread checks on iOS 15 - unexpected result #802

Answered by lukeredpath
lukeredpath asked this question in Q&A
Discussion options

You must be logged in to vote

Right, I think we've tracked down the problem - we were creating a scoped store on a background thread. We have a feature where we prompt for access to the user's contacts and the API for requesting permission calls back on a non-main thread - this is where we were initialising a scoped store to inject into our view. This is also why we didn't see it every time - once you've already granted permission once, subsequent calls to this API just call back immediately on the same thread.

So the bug was in our code after all (phew) but its very strange that it is being printed with a name main.

We set a breakpoint on the code that calls .scope and verified that we were on a background thread (on…

Replies: 20 comments 13 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@iampatbrown
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by lukeredpath
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@tgrapperon
Comment options

@stephencelis
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@lukeredpath
Comment options

@tgrapperon
Comment options

@mluisbrown
Comment options

@mluisbrown
Comment options

@tgrapperon
Comment options

Comment options

You must be logged in to vote
4 replies
@mbrandonw
Comment options

@gohanlon
Comment options

@mbrandonw
Comment options

@gohanlon
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants
Converted from issue

This discussion was converted from issue #788 on September 16, 2021 14:38.