My app is consuming a third party library and there is crash that happens on certain device such as iOS 13.3
Tried calling the method on main thread
Main Thread Checker: UI API called on a background thread: -[UIApplication statusBarOrientation] PID: 1496, TID: 390696, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
2020-01-28 12:31:47.733875+0000 My BT Gotham[1496:390696] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'threading violation: expected the main thread'
Tried calling the method on background thread
Here is the errror
- Assertion failure in -[FBSSerialQueue assertOnQueue], /BuildRoot/Library/Caches/com.apple.xbs/Sources/FrontBoardServices/FrontBoard-626.4.1/FrontBoardServices/FBSSerialQueue.m:98 2020-01-28 17:23:47.972336+0000 My BT Gotham[1773:459656] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'threading violation: expected the main thread'
FYI: I always the API method on background thread and it works fine in most of the devices the issue that I quoted above works only in some devices.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){
[LibObj model_Method:self];
});