XCode 16 打包遇到的问题

1.bitcode

Asset validation failed,Invalid Executable. The executable 'XXX.app/Frameworks/AlivcConan.framework/AlivcConan' contains bitcode. 

解决办法:

可以通过xcrun bitcode_strip手动去除对应的framework的bitcode。如下示例中,${framework_path}是framework的二进制文件路径

xcrun bitcode_strip ${framework_path} -r -o ${framework_path}

例如:

命令行cd到alivcffmpeg在Xcode工程中的路径,执行以下命令

xcrun bitcode_strip alivcffmpeg -r -o alivcffmpeg

2.报错 Assertion failed: (aliasSectionNum == sectionNum && "alias and its target must be located in the same section"), function assignAliasAtomOffsetInSection, file Layout.cpp, line 4390.

解决办法:

other linker flags 增加-ld64