Xcode 14.3與cocoapods一些坑

坑一:

編譯時候出現(xiàn)

Could not build the precompiled application fon the device. Error (xcode):
filenot found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a

問題是cocoapods,里面庫的iOS Deployment Target版本設(shè)置問題。

解決方案:

方案一:手動去Pods的TARGETS,選中所有庫改Build Settings里面的iOS Deployment Target版本。

方案二:在Podfile,新增以下內(nèi)容

post_install do |installer|

? installer.generated_projects.each do |project|

? ? project.targets.each do |target|

? ? ? ? target.build_configurations.each do |config|

? ? ? ? ? ? config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'

? ? ? ? end

? ? end

? end

end

相關(guān)文章:https://blog.csdn.net/crasowas/article/details/129901398


坑二:

打包的時候出現(xiàn)

sent 29 bytes received 20 bytes 98.00 bytes/sec

total size is 0? speedup is 0.00

rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]

Command PhaseScriptExecution failed with a nonzero exit code

解決方案:

1、找到APP目錄下Pods/Target Support Files/Pods-APP項目名/Pods-APP項目名-frameworks.sh

2、打開后找到 source="$(readlink "${source}")" 替換為 source="$(readlink -f "${source}")"

相關(guān)文章:https://developer.apple.com/forums/thread/725230?answerId=746897022#746897022


坑三:

Xcode 14.3打包,iOS13閃退。

閃退條件:

1、Swift編寫的項目(同一時間打包,OC寫的老項目暫時沒出現(xiàn))

2、Xcode 14.3打包,注意是打包推送到TestFlight或者App Store。試過本地編譯調(diào)試都不會閃退。也試過跟debug和release包無關(guān)。

3、運行的設(shè)備是iOS 13大版本,不管是13.1~13.6都會(暫時沒有13.0機器),試過其他12/14/15/16都正常。

導(dǎo)出來閃退日志如下:

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 /BuildRoot/Library/Caches/com.apple.xbs/Sources/dyld/dyld-733.3.1/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: 0x000000016d39c1e0? x3: 0x0000000000000014

? ? x4: 0x000000016d39bde0? x5: 0x0000000000000000? x6: 0x000000016d39cb50? x7: 0x000000016d39cc68

? ? x8: 0x0000000000000020? x9: 0x0000000000000009? x10: 0x646c79642f312e33? x11: 0x6e6964616f4c2f33

? x12: 0x2f33646c79642f31? x13: 0x2e676e6964616f4c? x14: 0x6e696c202c707063? x15: 0x000a2e3937372065

? x16: 0x0000000000000209? x17: 0x0000000000000048? x18: 0x0000000000000000? x19: 0x0000000000000000

? x20: 0x000000016d39bde0? x21: 0x0000000000000014? x22: 0x000000016d39c1e0? x23: 0x0000000000000009

? x24: 0x0000000000000006? x25: 0x0000000000000389? x26: 0x0000000000000303? x27: 0x000000010306e4b0

? x28: 0x0000000000117cf0? fp: 0x000000016d39bdb0? lr: 0x00000001032c2498

? ? sp: 0x000000016d39bd70? pc: 0x00000001032bb5e4 cpsr: 0x40000000

? esr: 0x00000000? Address size fault

Binary images description not available

Error Formulating Crash Report:

Failed to create CSSymbolicatorRef - corpse still valid ˉ\_(ツ)_/ˉ

EOF

解決方案:

相同代碼,換了另一臺電腦,在Xcode 14.2下打包重新上線就可以了。

至于后續(xù),暫時未知,出問題圍觀此處:https://developer.apple.com/forums/thread/727680

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容