Only iOS 14+ getting crash and not able to know exact reason

Before I upgraded Xcode12, my code worked normally.

But after I upgraded to Xcode 12.0.1, when I compiled and released the version, my App would occasionally experience exceptions and crashes when running on iOS 14+ devices.

I have no ability to know the exact reason.


It is very hard to know exact reason without having an executable project, but something I find in the crash log:
  • The crash occurred in Thread 2, which is NOT the main thread.

  • There are several UIKit trace output in Thread 2.

So, the first thing you should check is a thread problem.
Aren't you triggering some UI updates within a non-main thread?
Examine somewhere near [QMUIToastContentView setCustomView:].

This sort of thread problems may happen only on specific new environment (for example, when running on iOS 14+ devices),
but it just depends on implementation and runtime details and should be fixed also for old environments.

Anyway, you should better check UI updates within a non-main thread first.
Only iOS 14+ getting crash and not able to know exact reason
 
 
Q