Tag Archives: Code signing “AipBase.framework“ failed

[Solved] Xcode13.0 Package Error: Code signing “AipBase.framework“ failed.

There is no problem in direct operation, but the architecture/IPA/upload Appstore reports the error “unsupported architecture. Your executable contains unsupported architecture ‘[x86_64, i386]

Solution:
remove the supporting simulators i386 and x86_64 architecture in Baidu’s aipbase.framework and aipocrsdk.framework

# Use lipo -info to see what architecture is included
lipo -info AipBase.framework/AipBase  # Architectures in the fat file: AipBase are: i386 x86_64 armv7 armv7s arm64
# remove x86_64, i386
lipo -remove x86_64 AipBase.framework/AipBase -o AipBase.framework/AipBase
lipo -remove i386 AipBase.framework/AipBase -o AipBase.framework/AipBase
lipo -remove x86_64 AipOcrSdk.framework/AipOcrSdk -o AipOcrSdk.framework/AipOcrSdk
lipo -remove i386 AipOcrSdk.framework/AipOcrSdk -o AipOcrSdk.framework/AipOcrSdk
# re-check
lipo -info AipBase.framework/AipBase # Architectures in the fat file: AipBase are: armv7 armv7s arm64