My app is crashing when I'm closing it. This only happens in the Testflight version but not in the AppCenter. It had previously worked so I haven't made any code changes. The only change I've made is updating some frameworks. Not sure what is going on, any pointers to the right direction is highly appreciated.
Thread 0 name: Dispatch queue: com.apple.main-threadThread 0 Crashed:0 libswiftCore.dylib 0x0000000192dfdcb4 _assertionFailure+ 224436 (_:_:file:line:flags:) + 4921 libswiftCore.dylib 0x0000000192dfdcb4 _assertionFailure+ 224436 (_:_:file:line:flags:) + 4922 CustomKit 0x0000000104c45f50 0x104bb8000 + 5814563 CustomKit 0x0000000104c45c68 0x104bb8000 + 5807124 CustomKit 0x0000000104c45fa4 0x104bb8000 + 5815405 CustomKit 0x0000000103738750 0x103504000 + 23120166 CustomKit 0x0000000103738924 0x103504000 + 23124847 UIKitCore 0x0000000191b98ea8 __47-[UIApplication _applicationDidEnterBackground]_block_invoke + 2328 UIKitCore 0x0000000191476f40 +[UIViewController _performWithoutDeferringTransitionsAllowingAnimation:actions:] + 1649 UIKitCore 0x0000000191b98c94 -[UIApplication _applicationDidEnterBackground] + 14410 UIKitCore 0x00000001911e7ed8 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 90411 UIKitCore 0x0000000191755054 _UIScenePerformActionsWithLifecycleActionMask + 11212 UIKitCore 0x00000001911e7ab8 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 22413 UIKitCore 0x00000001911e74c0 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 30014 UIKitCore 0x00000001911e78c8 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 76815 UIKitCore 0x00000001911e7104 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 34016 UIKitCore 0x000000019101244c -[UIScene _invalidate] + 80417 UIKitCore 0x0000000191e0b0d4 -[UIWindowScene _invalidate] + 5218 UIKitCore 0x0000000191b8f278 -[UIApplication workspace:willDestroyScene:withTransitionContext:completion:] + 20819 UIKitCore 0x000000019168b114 -[UIApplicationSceneClientAgent scene:willInvalidateWithEvent:completion:] + 38820 FrontBoardServices 0x000000019ee9a570 -[FBSScene _callOutQueue_agent_willDestroyWithTransitionContext:completion:] + 27621 FrontBoardServices 0x000000019eec7b1c __84-[FBSWorkspaceScenesClient _queue_invalidateScene:withTransitionContext:completion:]_block_invoke_2 + 12822 FrontBoardServices 0x000000019eea94a0 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 24023 FrontBoardServices 0x000000019eec796c __84-[FBSWorkspaceScenesClient _queue_invalidateScene:withTransitionContext:completion:]_block_invoke + 32824 libdispatch.dylib 0x000000018edcddb0 _dispatch_client_callout + 2025 libdispatch.dylib 0x000000018edd1738 _dispatch_block_invoke_direct + 26826 FrontBoardServices 0x000000019eeee250 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 4827 FrontBoardServices 0x000000019eeedee0 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 44828 FrontBoardServices 0x000000019eeee434 -[FBSSerialQueue _performNextFromRunLoopSource] + 3229 CoreFoundation 0x000000018f15576c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 2830 CoreFoundation 0x000000018f155668 __CFRunLoopDoSource0 + 20831 CoreFoundation 0x000000018f154960 __CFRunLoopDoSources0 + 26832 CoreFoundation 0x000000018f14ea8c __CFRunLoopRun + 82433 CoreFoundation 0x000000018f14e21c CFRunLoopRunSpecific + 60034 GraphicsServices 0x00000001a6c52784 GSEventRunModal + 16435 UIKitCore 0x0000000191b8cfe0 -[UIApplication _run] + 107236 UIKitCore 0x0000000191b92854 UIApplicationMain + 16837 MyApp 0x0000000102a6d3e8 0x102a64000 + 3786438 libdyld.dylib 0x000000018ee0e6b0 start + 4Thread 1:0 libsystem_pthread.dylib 0x00000001da9b2754 start_wqthread + 0Thread 2:0 libsystem_pthread.dylib 0x00000001da9b2754 start_wqthread + 0Thread 3 name: com.apple.uikit.eventfetch-threadThread 3:0 libsystem_kernel.dylib 0x00000001bcf2c2d0 mach_msg_trap + 81 libsystem_kernel.dylib 0x00000001bcf2b660 mach_msg + 762 CoreFoundation 0x000000018f154c30 __CFRunLoopServiceMachPort + 3803 CoreFoundation 0x000000018f14ec14 __CFRunLoopRun + 12164 CoreFoundation 0x000000018f14e21c CFRunLoopRunSpecific + 6005 Foundation 0x00000001903fddf0 -[NSRunLoop+ 36336 (NSRunLoop) runMode:beforeDate:] + 2326 Foundation 0x00000001903fdcbc -[NSRunLoop+ 36028 (NSRunLoop) runUntilDate:] + 927 UIKitCore 0x0000000191c40d48 -[UIEventFetcher threadMain] + 5168 Foundation 0x000000019056fa34 __NSThread__start__ + 8649 libsystem_pthread.dylib 0x00000001da9a9b40 _pthread_start + 32010 libsystem_pthread.dylib 0x00000001da9b2768 thread_start + 8Thread 4 name: Dispatch queue: NSOperationQueue 0x107c0c100 (QOS: UNSPECIFIED)Thread 4:0 libsystem_kernel.dylib 0x00000001bcf2c324 semaphore_timedwait_trap + 81 libdispatch.dylib 0x000000018edce398 _dispatch_sema4_timedwait + 682 libdispatch.dylib 0x000000018edce9a8 _dispatch_semaphore_wait_slow + 763 AirshipCore 0x00000001044e40a4 -[UADelay start] + 82084 (UADelay.m:31)4 AirshipCore 0x0000000104527258 __34-[UADelayOperation initWithDelay:]_block_invoke + 356952 (UADelayOperation.m:17)5 Foundation 0x0000000190528850 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 246 Foundation 0x0000000190415740 -[NSBlockOperation main] + 1047 Foundation 0x000000019052aca4 __NSOPERATION_IS_INVOKING_MAIN__ + 248 Foundation 0x00000001904153c8 -[NSOperation start] + 8089 Foundation 0x000000019052b74c __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 2410 Foundation 0x000000019052b1d4 __NSOQSchedule_f + 18411 libdispatch.dylib 0x000000018eddbfb8 _dispatch_block_async_invoke2 + 14812 libdispatch.dylib 0x000000018edcddb0 _dispatch_client_callout + 2013 libdispatch.dylib 0x000000018edd112c _dispatch_continuation_pop + 41614 libdispatch.dylib 0x000000018edd0910 _dispatch_async_redirect_invoke + 78015 libdispatch.dylib 0x000000018edde93c _dispatch_root_queue_drain + 35616 libdispatch.dylib 0x000000018eddf120 _dispatch_worker_thread2 + 11617 libsystem_pthread.dylib 0x00000001da9ab7c8 _pthread_wqthread + 21618 libsystem_pthread.dylib 0x00000001da9b275c start_wqthread + 8Thread 5:0 libsystem_pthread.dylib 0x00000001da9b2754 start_wqthread + 0Thread 6:0 libsystem_pthread.dylib 0x00000001da9b2754 start_wqthread + 0Thread 7:0 libsystem_pthread.dylib 0x00000001da9b2754 start_wqthread + 0Thread 8:0 libsystem_kernel.dylib 0x00000001bcf2c2d0 mach_msg_trap + 81 libsystem_kernel.dylib 0x00000001bcf2b660 mach_msg + 762 MyApp 0x0000000102aa99bc 0x102a64000 + 2851163 libsystem_pthread.dylib 0x00000001da9a9b40 _pthread_start + 3204 libsystem_pthread.dylib 0x00000001da9b2768 thread_start + 8Thread 9 name: JavaScriptCore bmalloc scavengerThread 9:0 libsystem_kernel.dylib 0x00000001bcf501ac __psynch_cvwait + 81 libsystem_pthread.dylib 0x00000001da9ad458 _pthread_cond_wait + 11922 libc++.1.dylib 0x00000001a41e9328 std::__1::condition_variable::wait+ 54056 (std::__1::unique_lock<std::__1::mutex>&) + 283 JavaScriptCore 0x0000000199496400 void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >+ 15512576 (std::__1::unique_lock<bmalloc::Mutex>&) + 1084 JavaScriptCore 0x000000019949aacc bmalloc::Scavenger::threadRunLoop+ 15530700 () + 2085 JavaScriptCore 0x000000019949a6d8 bmalloc::Scavenger::Scavenger+ 15529688 (std::__1::scoped_lock<bmalloc::Mutex> const&) + 06 JavaScriptCore 0x000000019949bbf0 std::__1::__thread_specific_ptr<std::__1::__thread_struct>::set_pointer+ 15535088 (std::__1::__thread_struct*) + 07 libsystem_pthread.dylib 0x00000001da9a9b40 _pthread_start + 3208 libsystem_pthread.dylib 0x00000001da9b2768 thread_start + 8Thread 10 name: com.apple.NSURLConnectionLoaderThread 10:0 libsystem_kernel.dylib 0x00000001bcf2c2d0 mach_msg_trap + 81 libsystem_kernel.dylib 0x00000001bcf2b660 mach_msg + 762 CoreFoundation 0x000000018f154c30 __CFRunLoopServiceMachPort + 3803 CoreFoundation 0x000000018f14ec14 __CFRunLoopRun + 12164 CoreFoundation 0x000000018f14e21c CFRunLoopRunSpecific + 6005 CFNetwork 0x000000018fa242c0 0x18f7d8000 + 24091526 Foundation 0x000000019056fa34 __NSThread__start__ + 8647 libsystem_pthread.dylib 0x00000001da9a9b40 _pthread_start + 3208 libsystem_pthread.dylib 0x00000001da9b2768 thread_start + 8Thread 0 crashed with ARM Thread State (64-bit): x0: 0xe000000000000000 x1: 0x0000000283db4a80 x2: 0x0000000000000007 x3: 0x000000019ef2acdc x4: 0x00000000000062dc x5: 0x000000016d399920 x6: 0x0000000000000072 x7: 0x0000000000000001 x8: 0x000000000000007f x9: 0x0000000000000016 x10: 0x00000000000007fb x11: 0x00000000000007fd x12: 0x0000000000000001 x13: 0x00000000d9427819 x14: 0x00000000d9628000 x15: 0x0000000000000050 x16: 0x0000000080000000 x17: 0x0000000059600000 x18: 0x0000000110ff5850 x19: 0x000000010500be88 x20: 0x0000000000000000 x21: 0x0000000000000000 x22: 0x0000000000000061 x23: 0x000000010500ca20 x24: 0xe000000000000000 x25: 0x0000000000000000 x26: 0x000000000000000b x27: 0x0000000000000002 x28: 0x0000000000000000 fp: 0x000000016d399ac0 lr: 0x0000000192dfdcb4 sp: 0x000000016d399a40 pc: 0x0000000192dfdcb4 cpsr: 0x60000000 esr: 0xf2000001 Address size fault