LoginSignup
2
0

More than 5 years have passed since last update.

CocoaPods 1.2.0 で、arm64 以外への端末の Build や、archive が失敗するのでなんとかした

Last updated at Posted at 2017-02-24

pod install すると、なぜかライブラリのターゲット(ActionoSheetPicker-3.0)
の BuildSettings>Archtecture>archtectures が arm64 に設定されます。

スクリーンショット 2017-02-24 15.08.54.png

このままだと、iphone5 や ipadMini など arm64 でないCPUでの実行や、armv7 なども含む Build の Archive で失敗します。Project レベルだと、ふつうに Standard Architectures になっているので、下記のようなコードを Pod ファイルの末尾に書いて、target レベルの Architectures の設定を削除することで乗り切ることにしました。
Webで理由とか漁ったけどでてこんかった。なんでや!

post_install do |installer|
  installer.pods_project.targets.each do |target|
    next if target.name.start_with?("Pods")
    target.build_configurations.each do |config|
        config.build_settings.delete("ARCHS")
    end
  end
end
2
0
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
2
0