当我制作存档并将其发送到 TestFlight 时,我的应用程序开始崩溃。当我在真实设备上打开应用程序时,应用程序会在初始屏幕上等待一段时间然后崩溃。但是调试版本可以正常工作,没有任何问题。
我从手机中导出了崩溃,但我无法确定那里的问题:
Incident Identifier: 4D9DD2F1-E124-4AA3-BFEE-ACB83640F332
CrashReporter Key: 174a3861e99306b19bcfafa5e361aed4835d2a96
Hardware Model: iPhone7,1
Process: APPNAME [4880]
Path: /private/var/containers/Bundle/Application/AD750600-B6E2-4FAA-9A0B-2109E460BBC4/appname.app/APP
Identifier: APPNAMEBUNDLE
Version: 6 (1.3.2)
AppStoreTools: 12D4e
Code Type: ARM-64 (Native)
Role: Non UI
Parent Process: launchd [1]
Coalition: APPBANDLE [1036]
Date/Time: 2021-03-22 16:17:10.4435 +0100
Launch Time: 2021-03-22 16:16:50.3099 +0100
OS Version: iPhone OS 12.4.8 (16G201)
Baseband Version: 7.80.04
Report Version: 104
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Termination Description: SPRINGBOARD, scene-create watchdog
transgression: APPBANDLE exhausted real (wall clock) time allowance of 19.92 seconds | ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: scene-create | WatchdogVisibility: Foreground | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 5.260 (user 5.260, system 0.000), 13% CPU", | "Elapsed application CPU time (seconds): 2.258, 6% CPU" | )
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000197d800f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000197d7f5a0 mach_msg + 72
2 CoreFoundation 0x0000000198180914 __CFRunLoopServiceMachPort + 236
3 CoreFoundation 0x000000019817b824 __CFRunLoopRun + 1360
4 CoreFoundation 0x000000019817afb4 CFRunLoopRunSpecific + 436
...
玩了一些之后,我能够将发布版本作为调试版本,我遇到了同样的问题,我从 Xcode 控制台中提取了错误:
APPNAME[4964:990367] [javascript] 'Failed to print error: ', 'Maximum call stack size exceeded.'
我无法确定可能是什么问题...
更新
问题在我安装时开始react-native-unimodules
(我不使用 expo 只是 vanilla RN,但我需要来自 expo 的一些库)当我删除unimodules
它时工作正常