なぜやるか
先日退勤際にiOSアプリの申請をしようとしたら、以下の様なエラーが。。。
ERROR ITMS-90635: "Invalid Mach-O Format. The Mach-O in bundle "Hoge.app/Frameworks/JSTokenField.framework" isn’t consistent with the Mach-O in the main bundle. The main bundle Mach-O contains armv7(machine code) and arm64(machine code), while the nested bundle Mach-O contains armv7(bitcode and machine code) and arm64(bitcode and machine code). Verify that all of the targets for a platform have a consistent value for the ENABLE_BITCODE build setting."
ERROR ITMS-90635: "Invalid Mach-O Format. The Mach-O in bundle "Hoge.app/Frameworks/FBSDKCoreKit.framework" isn’t consistent with the Mach-O in the main bundle. The main bundle Mach-O contains armv7(machine code) and arm64(machine code), while the nested bundle Mach-O contains armv7(bitcode and machine code) and arm64(bitcode and machine code). Verify that all of the targets for a platform have a consistent value for the ENABLE_BITCODE build setting."
対応方法
PodでインストールしたライブラリがBITCODEに対応してないようなのでEnable Bitcode
をNo
にしたいが
PodのBuildSettingはいじってもPod Update
のたびに上書きされてしまうので
以下のようにPodifle内にてインストール後上書きするように修正。
Podfile
post_install do |installer|
# PodのBuildActiveArchitectureOnlyをNoに変更
installer.pods_project.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
# PodのBuildActiveArchitectureOnlyをすべてNoに変更
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end