XCode15 编译、运行、打包各种报错处理整理
1. 真机编译时报错:
Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp, line 5758
解决方案:
在 targets-->Build Settings -->Other Linker Flags 里添加 -ld_classic
重新编译即可。
2. 编译时报错:(真机对应:libarclite_iphoneos,模拟器对应libarclite_iphonesimulator,都是缺少文件)
SDK does not contain 'libarclite' at the path'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/
lib/arc/libarclite_iphonesimulator.a'; try increasing the minimum deployment target
解决方案:
(1) 到这个路径下,创建 arc文件夹
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/
(2) 到这个地址下载缺少的文件
下载:https://github.com/kamyarelyasi/Libarclite-Files中的 libarclite_iphoneos.a,libarclite_iphonesimulator.a
(3) 重新编译即可。
3. 编译运行没问题,但是打包Archive时出现:
IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AFNetworking.framework" failed: No such file or directory.
解决方案:
在Pods/Targets Support Files/Pods-App-frameworks.sh中:
source="$(readlink "${source}")" 修改为: source="$(readlink -f "${source}")"
重新打包即可。