15
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Cocoapodsで管理してるライブラリのEnable BitcodeをNoにする方法

Last updated at Posted at 2016-06-06

なぜやるか

先日退勤際に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 BitcodeNoにしたいが
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

Podfileに関する他のTips

Podfileのこれだけは書いておきたい2つの設定

15
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?