I am trying to create the .ipa file for the AppStore release. It works perfectly fine when I run the app on the simulator and device even If I make the build using the development option, I don't get any crashes. I went through a few of the posts on Stackoverflow where people had similar problems and tried the following things:
Setting SWIFT_OPTIMIZATION_LEVEL = "-Onone"; for release mode Setting GCC_OPTIMIZATION_LEVEL = 0;
Here is the complete crash log. Any quick help would be very appreciated.
Hardware Model: iPhone11,8
Process: testapp [1600]
Path: /private/var/containers/Bundle/Application/7687FE3E-0901-49F2-B2AF-4AED45EF0FE3/testapp.app/testapp
Identifier: com.testapp
Version: 5 (1.0)
AppStoreTools: 13A227
AppVariant: 1:iPhone11,8:14
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.testapp [575]
Date/Time: 2021-10-13 20:20:24.2547 +0530
Launch Time: 2021-10-13 20:20:23.9425 +0530
OS Version: iPhone OS 14.8 (18H17)
Release Type: User
Baseband Version: 3.05.00
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 5
Last Exception Backtrace:
0 CoreFoundation 0x188d0adc0 __exceptionPreprocess + 220 (NSException.m:199)
1 libobjc.A.dylib 0x19d8627a8 objc_exception_throw + 60 (objc-exception.mm:565)
2 CoreFoundation 0x188d7d5a0 _CFThrowFormattedException + 116 (CFObject.m:2015)
3 CoreFoundation 0x188bf5568 -[__NSArrayM objectAtIndexedSubscript:] + 220 (NSArrayM.m:302)
4 WebEngage 0x102bc7a2c -[WEGManager sdkVersion] + 392 (WEGManager.m:552)
5 WebEngage 0x102bc6448 __50-[WEGManager scheduleTasksRequiredForExtensionSDK]_block_invoke + 676 (WEGManager.m:386)
6 Foundation 0x18a097f88 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 24 (NSOperation.m:1544)
7 Foundation 0x189f85628 -[NSBlockOperation main] + 104 (NSOperation.m:1563)
8 Foundation 0x18a09a3b0 __NSOPERATION_IS_INVOKING_MAIN__ + 24 (NSOperation.m:2188)
9 Foundation 0x189f852b0 -[NSOperation start] + 808 (NSOperation.m:2205)
10 Foundation 0x18a09ae54 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 24 (NSOperation.m:2219)
11 Foundation 0x18a09a8e0 __NSOQSchedule_f + 184 (NSOperation.m:2230)
12 libdispatch.dylib 0x188906484 _dispatch_block_async_invoke2 + 148 (queue.c:527)
13 libdispatch.dylib 0x1888f781c _dispatch_client_callout + 20 (object.m:559)
14 libdispatch.dylib 0x1888facf4 _dispatch_continuation_pop + 448 (inline_internal.h:2557)
15 libdispatch.dylib 0x1888fa384 _dispatch_async_redirect_invoke + 592 (queue.c:805)
16 libdispatch.dylib 0x188908fe0 _dispatch_root_queue_drain + 388 (inline_internal.h:2598)
17 libdispatch.dylib 0x1889097d8 _dispatch_worker_thread2 + 112 (queue.c:6765)
18 libsystem_pthread.dylib 0x1d49ce768 _pthread_wqthread + 216 (pthread.c:2449)
19 libsystem_pthread.dylib 0x1d49d574c start_wqthread + 8
Thread 5 name:
Thread 5 Crashed:
0 libsystem_kernel.dylib 0x00000001b6f46334 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001d49cda9c pthread_kill + 272 (pthread.c:1582)
2 libsystem_c.dylib 0x00000001920d1b84 abort + 124 (abort.c:118)
3 libc++abi.dylib 0x000000019d943bb8 abort_message + 132 (abort_message.cpp:78)
4 libc++abi.dylib 0x000000019d934ec8 demangling_terminate_handler() + 308 (cxa_default_handlers.cpp:67)
5 libobjc.A.dylib 0x000000019d84105c _objc_terminate() + 144 (objc-exception.mm:701)
6 libc++abi.dylib 0x000000019d942fa0 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
7 libc++abi.dylib 0x000000019d942f2c std::terminate() + 48 (cxa_handlers.cpp:88)
8 libdispatch.dylib 0x00000001888f7830 _dispatch_client_callout + 40 (object.m:562)
9 libdispatch.dylib 0x00000001888facf4 _dispatch_continuation_pop + 448 (inline_internal.h:2557)
10 libdispatch.dylib 0x00000001888fa384 _dispatch_async_redirect_invoke + 592 (queue.c:805)
11 libdispatch.dylib 0x0000000188908fe0 _dispatch_root_queue_drain + 388 (inline_internal.h:2598)
12 libdispatch.dylib 0x00000001889097d8 _dispatch_worker_thread2 + 112 (queue.c:6765)
13 libsystem_pthread.dylib 0x00000001d49ce768 _pthread_wqthread + 216 (pthread.c:2449)
14 libsystem_pthread.dylib 0x00000001d49d574c start_wqthread + 8
Thread 5 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x000000016e04a3d0 x5: 0x000000016e04a970 x6: 0x000000000000006e x7: 0x0000000000000900
x8: 0x1d15ef0afdc9ea48 x9: 0x1d15ef0b93cd5a48 x10: 0x0000000000000002 x11: 0x0000000000000003
x12: 0x0000000000000000 x13: 0x0000000000000000 x14: 0x0000000000000010 x15: 0x0000000000000000
x16: 0x0000000000000148 x17: 0x000000016e04b000 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000000002e07 x21: 0x000000016e04b0e0 x22: 0x0000000000000134 x23: 0x0000000000000000
x24: 0x0000000000000000 x25: 0x000000016e04b0e0 x26: 0x0000000000000000 x27: 0x000000016e04b180
x28: 0x00000000000005ff fp: 0x000000016e04a8e0 lr: 0x00000001d49cda9c
sp: 0x000000016e04a8c0 pc: 0x00000001b6f46334 cpsr: 0x40000000
esr: 0x56000080 Address size fault