環境
- macOS Sequoia 15.3
- Flutter 3.27.3
- Xcode 16.2
エラー本文
Could not build the precompiled application for the device.
Semantic Issue (Xcode): Use of undeclared identifier 'FIRVectorValue'
/Users/user-name/.pub-cache/hosted/pub.dev/cloud_firestore-5.6.7/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestoreReader.m:40:15
原因
おそらくPodfile
で指定しているfirestoreのパッケージとpubspec.yaml
で使っているfirestoreのバージョンが不整合になっている
解決
リリースノートを読むとFIRVectorValue
はv11.1.0からサポートされているので以下のような記述がある場合は削除またはコメントアウトする
# 以下のような記述があればコメントアウト
# $FirebaseSDKVersion = '10.29.0'
puspec.yaml
firebase_core: ^3.13.0 # 最新に近いバージョンにしておく
あとは適当にいつものコマンドをして
flutter clean
rm -rf ios/Pods/
rm -rf ios/Podfile.lock
flutter pub get
cd ios
pod install --repo-update
flutter pub cache repair
flutter pub cache clean