iOS打包报错:** ARCHIVE FAILED ** .mm normal armv7 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler

最近开发的项目,打包的时候碰到这样的错误:

The following build commands failed:

CompileC /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/TeamWork-dcydxlohadttmhgasednrnhgumaw/Build/Intermediates/ArchiveIntermediates/TeamWork-Product/IntermediateBuildFilesPath/TeamWork.build/Product-iphoneos/TeamWork.build/Objects-normal/armv7/WMessageCenter.o TeamWork/zt2a/WMessageCenter.mm normal armv7 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler

经过分析发现是如下原因:将object-c的对象,赋值给了基本类型。在模拟器上运行不会报错,但是打包的时候,就会报错了。切记切记。

BOOL named = @NO;

解决方法:检查赋值左右两边的数据类型,保证两边数据类型一致。

修改为:

BOOL named = NO;

你可能感兴趣的:(iOS打包报错:** ARCHIVE FAILED ** .mm normal armv7 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler)