iOS9 – This application is modifying the autolayout engine from a background thread — where?

This code PSPDFUIKitMainThreadGuard causes assertions on UIKit access outside the main thread

Steps to use:

  1. Add to project and compile this file without ARC
  2. Move PSPDFAssert definition to the first of the file
  3. Comment calling of PSPDFLogError as it is not defined
  4. 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

Leave a Comment