Xcode14.3 打包,iOS13系统,启动闪退
2024-04-09 20:00:53  阅读数 3171

4月起,iOS项目上线appstore发布,需要使用Xcode14.1及Xcode14.1+进行打包,否则会被拒,被拒理由如下


image.png

晚上乖乖的升级电脑系统版本,xcode版本,xcode直接从Appstore下载的最新版本Xcode14.3,然后运行项目时,又碰到了报错


image.png

这是CocoaPods的问题,对应的*-frameworks.sh文件进入如下修改
//原来
source="$(readlink "${source}")"
//现在
source="$(readlink -f "${source}")"

image.png

顺利运行并打包,iOS14+的手机都安装正常,然而iOS13系统的,通过从本地拿log,log详情如下

Incident Identifier: 261A31C3-3C40-4B4B-B028-11E357E02B07
CrashReporter Key:   e3ea49bd8801e8abdf6e0dd32942962ad4ba114d
Hardware Model:      iPhone11,8
Process:             APP名字 [1913]
Path:                /private/var/containers/Bundle/Application/028BD7B6-40A6-4793-9CE3-ADD6D216B7C9/APP名字.app/APP名字
Identifier:          xx
Version:             4 (1.3.4)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.lakala.haotk [1123]


Date/Time:           2023-04-06 10:35:03.4554 +0800
Launch Time:         2023-04-06 10:35:03.4464 +0800
OS Version:          iPhone OS 13.6.1 (17G80)
Release Type:        User
Baseband Version:    2.07.00
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Description: DYLD, Assertion failed: (gotLocation), function applyFixupsToImage_block_invoke_3, file /Library/Caches/com.apple.xbs/Sources/dyld/dyld-750.4.2/dyld3/Loading.cpp, line 779.
Highlighted by Thread:  0

Backtrace not available

Unknown thread crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000006   x1: 0x0000000000000009   x2: 0x000000016b3685b0   x3: 0x0000000000000014
    x4: 0x000000016b3681b0   x5: 0x0000000000000000   x6: 0x000000016b368f40   x7: 0x000000016b369058
    x8: 0x0000000000000020   x9: 0x0000000000000009  x10: 0x2e342e3035372d64  x11: 0x2f33646c79642f32
   x12: 0x2f33646c79642f32  x13: 0x2e676e6964616f4c  x14: 0x6e696c202c707063  x15: 0x000a2e3937372065
   x16: 0x0000000000000209  x17: 0x0000000105ebf370  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x000000016b3681b0  x21: 0x0000000000000014  x22: 0x000000016b3685b0  x23: 0x0000000000000009
   x24: 0x0000000000000006  x25: 0x0000000000000843  x26: 0x0000000000000d52  x27: 0x0000000105bdac90
   x28: 0x00000000006496c8   fp: 0x000000016b368180   lr: 0x0000000105ecc4cc
    sp: 0x000000016b368140   pc: 0x0000000105ec4d90 cpsr: 0x40000000
   esr: 0x00000000  Address size fault

Binary images description not available

Error Formulating Crash Report:
Failed to create CSSymbolicatorRef - corpse still valid ¯\_(ツ)_/¯

EOF

看样子可能是定位的问题,但是具体也没找到最终的地方,最后看到网上也有朋友碰到相同的问题,说降级到Xcode14.2就可以了,于是先用同事xcode14.2试了一下,果然可以,具体原因还没来的及细查,等确定好再来更新