简体   繁体   中英

iOS9 - Xcode 7.2 Crash Warning issue

How to resolve this issue

This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release.

I know this means some UIKit code is called from a background thread, and I know the solution is to wrap the code in

dispatch_async(dispatch_get_main_queue(), ^(void){ <code> });

My problem is locating where to do that and How can I identify the background code which is apparently modifying the UI?

Any help is welcome..

Thanks!

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

Your app will crash and stop with any attemption to modify any UI element from background thread see this Link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM