This code PSPDFUIKitMainThreadGuard causes assertions on UIKit access outside the main thread
Steps to use:
- Add to project and compile this file without ARC
- Move
PSPDFAssert
definition to the first of the file - Comment calling of
PSPDFLogError
as it is not defined - import
<UIKit/UIKit.h>
Your app will crash and stop with any attemption to modify any UI element from background thread
For swift use the following code: NBUIKitMainThreadGuard