xcode9 beta - How to mark methods to be invoked only from the main thread in Obj-C? -


i'm experimenting new xcode 9 main thread checker

this pretty neat. i'd mark / annotate obj-c methods invoked main thread main thread checker can kick-in automatically when attached debugger. can't find way this.

you can't (see update). use assert manually (like pspdfkit example)

assert(thread.ismainthread, "method must called mainthread only!") 


update:

there's no way. tweet employee:

unfortunately not; cannot teach main thread checker apis (cc @kubamracek)

by @zaks_anna (program analysis @apple)


update2: there's open radar being tracked apple, id#32659599. hopefully, implemented soon™.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -