Categories
Mastering Development

“NSInternalInconsistencyException: threading violation: expected the main thread” outside of my code

My iOS App is crashing with the following error: *** Assertion failure in -[FBSSerialQueue assertOnQueue], /BuildRoot/Library/Caches/com.apple.xbs/Sources/FrontBoardServices/FrontBoard-626.4.1/FrontBoardServices/FBSSerialQueue.m:98 *** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘threading violation: expected the main thread’ And this is the stacktrace: Exception: NSInternalInconsistencyException Reason: threading violation: expected the main thread Stacktrace: ( 0 CoreFoundation 0x000000018d56c980 DC2C95C6-B954-39E8-86A2-5E0AF8801E87 + 1255808 1 libobjc.A.dylib […]