坑一:
編譯時(shí)候出現(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寝殴,里面庫(kù)的iOS Deployment Target版本設(shè)置問題壁顶。
解決方案:
方案一:手動(dòng)去Pods的TARGETS蛾绎,選中所有庫(kù)改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
坑二:
打包的時(shí)候出現(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項(xiàng)目名/Pods-APP項(xiàng)目名-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編寫的項(xiàng)目(同一時(shí)間打包含友,OC寫的老項(xiàng)目暫時(shí)沒出現(xiàn))
2替裆、Xcode 14.3打包,注意是打包推送到TestFlight或者App Store窘问。試過本地編譯調(diào)試都不會(huì)閃退辆童。也試過跟debug和release包無關(guān)。
3惠赫、運(yùn)行的設(shè)備是iOS 13大版本把鉴,不管是13.1~13.6都會(huì)(暫時(shí)沒有13.0機(jī)器),試過其他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
解決方案:
相同代碼庭砍,換了另一臺(tái)電腦,在Xcode 14.2下打包重新上線就可以了混埠。
至于后續(xù)怠缸,暫時(shí)未知,出問題圍觀此處:https://developer.apple.com/forums/thread/727680