LoginSignup
2

More than 1 year has passed since last update.

【flutter】iOS開発・リリースプロセス時に遭遇した解決困難だったエラーの解決方法

Last updated at Posted at 2021-12-17

この記事の目的

flutterで開発をしていて、なかなか解決できなかったエラーをまとめる。

エラー1: xcode doesn’t support xx’s iOS 15.1 (19B74).

問題点

実機テストを行おうとした際に、

xcode doesn’t support xxxxx’s iOS 15.1 (19B74).

とエラーが出て実機テストができない。

解決方法

  • 以下のページから、該当versionのファイルをダウンロードする。

https://github.com/filsv/iPhoneOSDeviceSupport
スクリーンショット_2021-12-18_0_50_57.jpg

  • ダウンロードしたファイルを解凍して、以下のフォルダに移動する。
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

kota-ninomiya_—_-bash_—_122×31.jpg

  • Xcodeを再起動して、再度実機ビルドを試す。

参考ページ

エラー2: Invalid Bundle. The bundle <your.app> does not support the minimum OS Version specified in the Info.plist

問題点

アプリをapple store connectにアップロードしようとしてvalidationを行うと、上記のエラーが出てアップロードすることができない。

解決策

ネットでたくさんヒットする解決策

  • /ios/Flutter/AppframeworkInfo.plistの MinimumOSVersion を 13.0 にする
  • プロジェクトの iOS Deployment Target を 13.0にする
  • ターゲットの iOS Deployment Target を 13.0にする
  • flutter cleanしてから再ビルド

しかしながらこの解決策では解決しなかった。

参考ページ

ようやく辿り着いた解決策

flutterのversionを、stableのchannelを利用する。

flutterのバージョンには、以下の4つのchannelがあり、機能や安定性に差がある。
そのため、安定しているstableのchannelのversionを利用するようにする。

  • stable
  • beta
  • dev
  • master

実際に利用しているchannelを確認したらdevだった。。。
以下のページに従ってchannelをstableにし、バージョンも更新する。

その後、以下のコマンドを順に実行後に再度validationを実行すると、無事成功!!!

flutter clean
flutter pub get
cd ios
pod install
参考ページ

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