Code signing "FBSDKCoreKit.framework" failed.

打包时:Code signing "FBSDKCoreKit.framework" failed.

今天在iOS上编译原来开发的代码,出现了以下错误

xxxx.o does not contain bitcode. You must rebuild it with bitcode enabled (Xcodesetting ENABLE_BITCODE)

百度后知道Xcode7.0以后会默认开启Bitcode模式,很多旧的静态库由于编译问题,无法支持Bitcode,需要重新编译才能使用。

如果不想重新编译,只需要关闭Bitcode就可以了

具体按以下操作:

在Targets -> Build Settings -> Build Options 下

将Enable Bitcode 设置为NO即可


--------------本以为ok了------然而-----------

又出现:App Store Connect Operation Error

ERROR ITMS-90087: "Unsupported Architectures. The executable for星盘说.app/Frameworks/FBSDKCoreKit.framework contains unsupported architectures '[i386, x86_64]'."

报这个错一般是由于自己制作的framework 包含了x86_64, i386 架构,这个是苹果不允许的。

解决办法:剔除掉x86_64, i386这两个架构

三种办法:

1、重新打包解决

2、工程中添加shell脚本来解决

3、通过终端来去除

推荐shell脚本解决:


APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"

# This script loops through the frameworks embedded in the application and

# removes unused architectures.

find"$APP_PATH"-name'*.framework'-typed |whileread-r FRAMEWORK

do

FRAMEWORK_EXECUTABLE_NAME=$(defaultsread"$FRAMEWORK/Info.plist"CFBundleExecutable)

FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"

echo"Executable is $FRAMEWORK_EXECUTABLE_PATH"

EXTRACTED_ARCHS=()

forARCHin$ARCHS

do

echo"Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"

lipo -extract"$ARCH""$FRAMEWORK_EXECUTABLE_PATH"-o"$FRAMEWORK_EXECUTABLE_PATH-$ARCH"

EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")

done

echo "Merging extracted architectures:${ARCHS}"

lipo -o"$FRAMEWORK_EXECUTABLE_PATH-merged"-create"${EXTRACTED_ARCHS[@]}"

rm"${EXTRACTED_ARCHS[@]}"

echo "Replacing original executable with thinned version"

rm"$FRAMEWORK_EXECUTABLE_PATH"

mv"$FRAMEWORK_EXECUTABLE_PATH-merged""$FRAMEWORK_EXECUTABLE_PATH"

done


就好了:

貌似:遇到过IPA processing failed也是上面的原因!!!

推荐阅读更多精彩内容