広告

Flutterラボの

プレミアム会員になる

【Flutter】【Dart】FireStoreを追加してからXcode Buildがめっちゃ遅い時の対処法。

2021.02.03

スクリーンショット 2021-02-03 16.05.08

問題

問題としてはおそらくfirestoreに関するpackageをbuild毎にダウンロードを行っているのが原因で、buildの時間が長くなっていると思われます。

解決策

下記の一行を追加する。

 pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '6.33.0'

厳密には下記の部分に追加します。

target 'Runner' do
 use_frameworks!
 use_modular_headers!
 pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '6.33.0'
 flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

pod installを実行する

pod install


まとめ

FireStoreをパッケージとして取得した途端buildが遅くなったのでとても困ったのでリサーチしました。面倒ですがこれでflutter cleanをしない限り極端にbuild時間を短縮することができました。


Flutterラボ
hatchoutschool
FlutterとNuxtに関する知識を発信しています! 動画で学べる学習サイト『Flutterラボ』と『Nuxtラボ』を運営 Flutterラボ:https://flutterlabo.tech/ 広告のECサイトを開発(https://ec-ad.tech/)