Reputation: 35112
Got this runtime warning, how to get line where it happens?
runtime: UI API called from background thread: -[UIView bounds] must be used from main thread only
Is it any breakpoints i.e. symbolic breakpoint
for this?
Upvotes: 2
Views: 714
Reputation: 6992
The answer by Puneet Sharma is good, but it has a downside: it requires Xcode 9. However, what you want is possible in earlier version as well, using symbolic breakpoints
It works, but I noticed it makes the app run dramatically slow, so whenever possible, use Puneet Sharma's method
Upvotes: 1
Reputation: 9484
Main Thread checker has an option for pausing at the issue. You just need to enable it.
EditScheme->Run->Diagnostics->RunTime API Checking-> Select both Main Thread Checker and Pause On Issues
Upvotes: 3