有没有人知道如何解决这个问题? Fabric上发布了很多崩溃,只出现在iOS 11上.Fabric给出了一个提示:
此崩溃具有非主线程,似乎使用UIKit类或函数。一般来说,从主线程中使用UIKit是安全的。从后台线程调用UIKit会导致不可预测的行为(如崩溃!)。请仔细检查所有代码(不在主线程上)是否已被Apple明确标记为可在后台使用。
以下是崩溃会话:
Crashed: WebThread
0 libobjc.A.dylib 0x1845041a0 objc_retain + 16
1 UIKit 0x18e850a10 -[UIView(Hierarchy) subviews] + 76
2 UIKit 0x18eb4416c -[UIView(CALayerDelegate) _wantsReapplicationOfAutoLayoutWithLayoutDirtyOnEntry:] + 72
3 UIKit 0x18e856e60 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1348
4 QuartzCore 0x1892e3948 -[CALayer layoutSublayers] + 184
5 QuartzCore 0x1892e7ad0 CA::Layer::layout_if_needed(CA::Transaction*) + 332
6 QuartzCore 0x18925431c CA::Context::commit_transaction(CA::Transaction*) + 336
7 QuartzCore 0x18927bb40 CA::Transaction::commit() + 540
8 QuartzCore 0x18927c980 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92
9 CoreFoundation 0x185246cdc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
10 CoreFoundation 0x185244694 __CFRunLoopDoObservers + 412
11 CoreFoundation 0x185164c78 CFRunLoopRunSpecific + 468
12 WebCore 0x18d0d984c RunWebThread(void*) + 560
13 libsystem_pthread.dylib 0x184ec82b4 _pthread_body + 308
14 libsystem_pthread.dylib 0x184ec8180 _pthread_body + 310
15 libsystem_pthread.dylib 0x184ec6b74 thread_start + 4