3
0

問題の特定

iOSアプリのバージョンを引き上げようとしたら以下のようなエラーが発生した。

SDK does not contain 'libarclite' at the path '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a'; try increasing the minimum deployment target

開発環境

  • Xcode15.4
  • Swift 5.10
  • CocoaPods 1.13.0

問題解決の解説

エラー文で検索すると以下のような質問が StackOverflow にあった。

また、回答内で言っている Apple Staff の回答はこちら:

Xcode14以降から、iOS 11以上のデプロイメント・ターゲットでのビルドしかサポートしておらず、libarclite は過去、古いOSには必要だったが、現在は廃止されている。

つまり、ライブラリで deployment target が11未満のものを使うには、引き上げ11以上に引き上げる必要がある。

問題の解決方法

上記のことから、StackOverflow の回答にもある通り、以下のコードを Podfile 内部に書く必要がある。

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings["IPHONEOS_DEPLOYMENT_TARGET"] = "11.0"
    end
  end
end

"IPHONEOS_DEPLOYMENT_TARGET" は 11.0 以上なら通ると思うので、自分のプロジェクトファイルと合わせるのが良さそう。

わからないこと

Apple Staff が言っていた libarclite が一体どういう役割をしているのか調べてもわからなかったので、これを読んでいる人がいて、知っていたらコメントして欲しいです :pray:

3
0
1

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
3
0