iOS 12 app crashes on opening and closes quickly - libswift_Concurrency.dylib

Hello everyone, I am having a problem with my iPhone 6 running iOS 12.X.X. The app opens and closes immediately. The app works fine when the IPA is sent for testing, but when downloaded from TestFlight, it crashes. This happened after I migrated from Cordova 10 to 11. According to forums, the problem was related to Xcode version 13.2.1, but my Xcode version is supposed to have this bug fixed, according to the release notes from Apple. However, I cannot update Xcode due to OS limitations, which is not relevant here. In any case, I would like to know if anyone has had this type of problem with the lib libswift_Concurrency.dylib on iOS 12.


Date/Time:           2023-01-10 20:08:37.7384 -0300
Launch Time:         2023-01-10 20:08:37.3748 -0300
OS Version:          iPhone OS 12.5.6 (16H71)
Baseband Version:    7.80.04
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Description: DYLD, Symbol not found: ___chkstk_darwin | Referenced from: /private/var/containers/Bundle/Application/5947E3DB-EDA9-4A7A-8D14-F401FF4AFD83/ (which was built for iOS 13.0) | Expected in: dyld shared cache | in /private/var/containers/Bundle/Application/5947E3DB-EDA9-4A7A-8D14-F401FF4AFD83/
Triggered by Thread:  0

Thread 0 Crashed:
0   dyld                          	0x0000000101632418 __abort_with_payload + 8 (:-1)
1   dyld                          	0x0000000101631a58 abort_with_payload_wrapper_internal + 100 (terminate_with_reason.c:72)
2   dyld                          	0x0000000101631a88 abort_with_payload + 12 (terminate_with_reason.c:94)
3   dyld                          	0x00000001015f48f8 dyld::halt(char const*) + 304 (dyld.cpp:4024)
4   dyld                          	0x00000001015f76e4 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 5396 (dyld.cpp:6519)
5   dyld                          	0x00000001015f1044 _dyld_start + 68 (:-1)

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000006   x1: 0x0000000000000004   x2: 0x000000016ece2990   x3: 0x00000000000000b9
    x4: 0x000000016ece2590   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x000000016ece2ce0
    x8: 0x0000000000000020   x9: 0x0000000000000009  x10: 0x777362696c2f736b  x11: 0x636e6f435f746669
   x12: 0x62696c2f736b726f  x13: 0x6f435f7466697773  x14: 0x636e65727275636e  x15: 0x0062696c79642e79
   x16: 0x0000000000000209  x17: 0x0000000000000000  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x000000016ece2590  x21: 0x00000000000000b9  x22: 0x000000016ece2990  x23: 0x0000000000000004
   x24: 0x0000000000000006  x25: 0x000000000000002f  x26: 0x000000010164b5e0  x27: 0x000000010164b000
   x28: 0x000000010164ba00   fp: 0x000000016ece2560   lr: 0x0000000101631a58
    sp: 0x000000016ece2520   pc: 0x0000000101632418 cpsr: 0x00000000

I was able to solve the issue using another Mac with macOS Monterey and Xcode 13.4.1. Everything went smoothly after that.
When using macOS Ventura and Xcode 14, several problems arose, especially with FirebaseX, so in order to avoid further headaches, I built the project using macOS Monterey and Xcode 13.4.1.