flutter CocoaPods err (running pod install) - dart

When I run flutter run, CocoaPods' errr , Error running pod install
flutter stable,
updata pod, CocoaPods
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
-> Fetching podspec for `barcode_scan` from `.symlinks/plugins/barcode_scan/ios`
-> Fetching podspec for `flutter_full_pdf_viewer` from `.symlinks/plugins/flutter_full_pdf_viewer/ios`
-> Fetching podspec for `flutter_record` from `.symlinks/plugins/flutter_record/ios`
-> Fetching podspec for `flutter_vedio_compress` from `.symlinks/plugins/flutter_vedio_compress/ios`
[!] No podspec found for `flutter_vedio_compress` in `.symlinks/plugins/flutter_vedio_compress/ios`
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/external_sources/path_source.rb:14:in `block in fetch'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:86:in `titled_section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/external_sources/path_source.rb:11:in `fetch'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:825:in `fetch_external_source'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:804:in `block (2 levels) in fetch_external_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:803:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:803:in `block in fetch_external_sources'

I had a similar issue, I have stopped receiving the error while executing pod install, when I altered some of the dependencies in pubspec.yaml. What I have done was referring to the dependency's git link instead of its version number.
To make it more clear instead of:
barcode_scan: ^1.0.0
I have written:
barcode_scan:
git: git://github.com/apptreesoftware/flutter_barcode_reader.git

Related

Flutter build ios failing with: Error running pod install

When I run flutter build ios I get this failed output:
Running pod install... 471ms
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Finding Podfile changes
A firebase_dynamic_links
A path_provider_ios
A share_plus
- Flutter
- app_tracking_transparency
- cloud_firestore
- firebase_analytics
- firebase_auth
- firebase_core
- google_sign_in_ios
- purchases_flutter
- shared_preferences_ios
- sign_in_with_apple
- url_launcher_ios
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `app_tracking_transparency` from `.symlinks/plugins/app_tracking_transparency/ios`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
cloud_firestore: Using Firebase SDK version '10.1.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_analytics` from `.symlinks/plugins/firebase_analytics/ios`
firebase_analytics: Using Firebase SDK version '10.1.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
firebase_auth: Using Firebase SDK version '10.1.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '10.1.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_dynamic_links` from `.symlinks/plugins/firebase_dynamic_links/ios`
firebase_dynamic_links: Using Firebase SDK version '10.1.0' defined in 'firebase_core'
-> Fetching podspec for `google_sign_in_ios` from `.symlinks/plugins/google_sign_in_ios/ios`
-> Fetching podspec for `path_provider_ios` from `.symlinks/plugins/path_provider_ios/ios`
-> Fetching podspec for `purchases_flutter` from `.symlinks/plugins/purchases_flutter/ios`
-> Fetching podspec for `share_plus` from `.symlinks/plugins/share_plus/ios`
-> Fetching podspec for `shared_preferences_ios` from `.symlinks/plugins/shared_preferences_ios/ios`
-> Fetching podspec for `sign_in_with_apple` from `.symlinks/plugins/sign_in_with_apple/ios`
-> Fetching podspec for `url_launcher_ios` from `.symlinks/plugins/url_launcher_ios/ios`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only performed in repo
update
CDN: trunk Relative path: Specs/0/3/5/Firebase/9.6.0/Firebase.podspec.json exists! Returning local because checking is only
performed in repo update
CDN: trunk Relative path: all_pods_versions_6_1_e.txt exists! Returning local because checking is only performed in repo
update
CDN: trunk Relative path: Specs/6/1/e/nanopb/2.30909.0/nanopb.podspec.json exists! Returning local because checking is only
performed in repo update
CDN: trunk Relative path: all_pods_versions_d_4_0.txt exists! Returning local because checking is only performed in repo
update
CDN: trunk Relative path: Specs/d/4/0/GoogleSignIn/6.2.4/GoogleSignIn.podspec.json exists! Returning local because checking is
only performed in repo update
CDN: trunk Relative path: all_pods_versions_9_a_d.txt exists! Returning local because checking is only performed in repo
update
CDN: trunk Relative path: Specs/9/a/d/PurchasesHybridCommon/4.3.1/PurchasesHybridCommon.podspec.json exists! Returning local
because checking is only performed in repo update
CDN: trunk Relative path: Specs/0/3/5/Firebase/9.3.0/Firebase.podspec.json exists! Returning local because checking is only
performed in repo update
[!] CocoaPods could not find compatible versions for pod "Firebase/Firestore":
In snapshot (Podfile.lock):
Firebase/Firestore (= 9.3.0)
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 4.0.5, which depends on
Firebase/Firestore (= 10.1.0)
Specs satisfying the `Firebase/Firestore (= 9.3.0), Firebase/Firestore (= 10.1.0)` dependency were found, but they required a
higher minimum deployment target.
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `tap'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:257:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error running pod install
Whats odd is I was running builds for a few weeks no problem. I had to update some plugins inside the pubspec.yaml file then it all broke when building ios
I immediately googled my answered and found this stack overflow question here: Flutter Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified
They mentioned to:
You should uncomment your profile ios target.
I had already had that un-commented and set to platform :ios, '11.0'
I then did some more research and it looks like it could be a Mac M1 Chip issue: How to run CocoaPods on Apple Silicon (M1)
I followed the 2022 instructions there:
# Uninstall the local cocoapods gem
sudo gem uninstall cocoapods
# Reinstall cocoapods via Homebrew
brew install cocoapods
This failed and I think brought me into a bigger hole so I ran flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.8, on macOS 12.5 21G72 darwin-arm, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[!] Xcode - develop for iOS and macOS (Xcode 14.1)
! CocoaPods 1.5.2 out of date (1.11.0 is recommended).
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart
side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.73.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
I then clicked on the link and followed the instructions to update cocoa pods.
sudo gem install cocoapods
Fetching cocoapods-core-1.11.3.gem
Fetching cocoapods-1.11.3.gem
Successfully installed cocoapods-core-1.11.3
Successfully installed cocoapods-1.11.3
Parsing documentation for cocoapods-core-1.11.3
Installing ri documentation for cocoapods-core-1.11.3
Parsing documentation for cocoapods-1.11.3
Installing ri documentation for cocoapods-1.11.3
Done installing documentation for cocoapods-core, cocoapods after 2 seconds
2 gems installed
But if I run flutter doctor again, it still says its out of date...
Think I am in a worse place now.
To summarize a few keypoints here:
Your cocoapods installation was broken. So try removing the brew version first via "brew uninstall cocoapods" Then install cocoapods via sudo gem install cocoapods.
Your Podfile is referencing two different versions of the same package.
[!] CocoaPods could not find compatible versions for pod "Firebase/Firestore":
In snapshot (Podfile.lock):
Firebase/Firestore (= 9.3.0)
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 4.0.5, which depends on
Firebase/Firestore (= 10.1.0)
This might also cause the build error. You could try to find versions of the plugins snapshot and cloud_firestore that don't conflict with one another.

Flutter pod install error with 'cloud_firestore'

I have a Mac with M1 chip. When I'm trying to debug a flutter project with 'cloud_firestore' package I'm getting this error bellow:
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
cloud_firestore: Using Firebase SDK version '8.10.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
firebase_auth: Using Firebase SDK version '8.10.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '8.10.0' defined in 'firebase_core'
-> Fetching podspec for `geolocator_apple` from `.symlinks/plugins/geolocator_apple/ios`
-> Fetching podspec for `google_maps_flutter` from `.symlinks/plugins/google_maps_flutter/ios`
-> Fetching podspec for `location` from `.symlinks/plugins/location/ios`
-> Fetching podspec for `maps_launcher` from `.symlinks/plugins/maps_launcher/ios`
-> Fetching podspec for `path_provider_ios` from `.symlinks/plugins/path_provider_ios/ios`
-> Fetching podspec for `url_launcher_ios` from `.symlinks/plugins/url_launcher_ios/ios`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
[!] CocoaPods could not find compatible versions for pod "cloud_firestore":
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
Specs satisfying the `cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)` dependency were found, but they required a higher minimum deployment target.
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `tap'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:682:in `attempt_to_activate'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error output from CocoaPods:
↳
[!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
Error launching application on iPhone 13.
I have tried:
1- Go to Podfile and changed "platform :ios, '8.0'" to 9.0 and 10.0
2- flutter clean > flutter pub get
3- I deleted pod and run pod install
4- Also run this commands:
arch -x86_64 pod update
arch -x86_64 pod install --repo-update
But still getting same error. Any help how to fix this?
I solved the issue.
Problem was in 'main.dart'. I changed 'main' function from this:
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(MyApp());
}
to this:
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
runApp(MyApp());
}
So, I think options parameter on Firebase.initializeApp() is required now.
Adding options with FlutterFire CLI solved my problem.
Also, here documentation for this:
https://firebase.flutter.dev/docs/cli
I found another solution that worked for me. I think the problem stems from the default cocoapods install, as instructed on the cocoapods front page, has some M1 incompatibilities with its FFI (foreign function interface).
Installing cocoapods via homebrew instead, ensures that you are getting an apple silicon compatible version.
These instructions worked for me.
But it boils down to uninstalling cocoapods and reinstalling it via homebrew:
brew install cocoapods
1- sudo arch -x86_64 gem install ffi
2- arch -x86_64 pod install
The newer versions of firebase requires some updating and this is what worked for me
updated firebase on pubspec to latest version then ran the following
firebase login
dart pub global activate flutterfire_cli
flutterfire configure
deleted outdated Podfile.lock file
rm ios/Podfile.lock
updated the Podfile
pod repo update
build the project
flutter build ios
try this combination:
remove .symlinks && /Pods && podfile.lock
pod deintegrate
pod repo update
pod install
Try run it!

Unable to run my flutter app on ios simulator which is working perfectly on android simulator. Error running pod install

A collaborator created this project in windows and I have cloned it in my m1 macs and trying to run it in the ios simulator.
These are the logs when I do flutter run in my project folder.
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install... 860ms
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `better_player` from `.symlinks/plugins/better_player/ios`
-> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
firebase_auth: Using Firebase SDK version '6.33.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '6.33.0' defined in 'firebase_core'
-> Fetching podspec for `flutter_ffmpeg` from `.symlinks/plugins/flutter_ffmpeg/ios`
-> Fetching podspec for `gallery_saver` from `.symlinks/plugins/gallery_saver/ios`
-> Fetching podspec for `google_sign_in` from `.symlinks/plugins/google_sign_in/ios`
-> Fetching podspec for `image_picker` from `.symlinks/plugins/image_picker/ios`
-> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
-> Fetching podspec for `photo_manager` from `.symlinks/plugins/photo_manager/ios`
-> Fetching podspec for `simple_image_crop` from `.symlinks/plugins/simple_image_crop/ios`
-> Fetching podspec for `stripe_payment` from `.symlinks/plugins/stripe_payment/ios`
-> Fetching podspec for `vibration` from `.symlinks/plugins/vibration/ios`
-> Fetching podspec for `video_player` from `.symlinks/plugins/video_player/ios`
-> Fetching podspec for `video_thumbnail` from `.symlinks/plugins/video_thumbnail/ios`
-> Fetching podspec for `wakelock` from `.symlinks/plugins/wakelock/ios`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
CDN: trunk Relative path: all_pods_versions_2_5_a.txt exists! Returning local because checking is only perfomed in repo update
CDN: trunk Relative path: Specs/2/5/a/KTVHTTPCache/2.0.1/KTVHTTPCache.podspec.json exists! Returning local because checking is only perfomed in repo update
[!] CocoaPods could not find compatible versions for pod "firebase_auth":
In Podfile:
firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
Specs satisfying the `firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)` dependency were found, but they required a higher minimum deployment target.
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1074:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error output from CocoaPods:
↳
[!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See
`https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
Error launching application on iPhone 12 Pro Max.
In the podfile try assigning ios version to 10. This error as been bugging me for days now. I am not sure but this may fix it.
Please try to increment the minimum deployment target at ios/flutter/AppFrameworkInfo.plist, named MinimumOSVersion. Also try incrementing the deployment target in ios/Podfile :
source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
...
Extracted from this answer and this other one

Flutter 'Error running pod install' 'Pods-Runner' target has transitive dependencies

When trying to run my flutter project I get:
Error running pod install
(I saw another very similar post but I'm not sure if I'm having the same issue.)
I'm writing Dart code with Flutter on macOS Mojave version 10.14.6.
I've tried:
flutter clean
flutter doctor
flutter upgrade
`flutter precache
flutter run
I've tried every flutter command in every possible combination of said commands, but still get the same error.
flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.9.1+hotfix.4, on Mac OS X 10.14.6 18G103, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.2)
[✓] Connected device (1 available)
• No issues found!
flutter run:
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install... 1.3s
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Finding Podfile changes
M Flutter
- barcode_scan
- flutter_webview_plugin
- google_sign_in
- path_provider
- shared_preferences
- sqflite
- url_launcher
Fetching external sources
-> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
-> Fetching podspec for `barcode_scan` from
`.symlinks/plugins/barcode_scan/ios`
-> Fetching podspec for `flutter_webview_plugin` from
`.symlinks/plugins/flutter_webview_plugin/ios`
-> Fetching podspec for `google_sign_in` from
`.symlinks/plugins/google_sign_in/ios`
-> Fetching podspec for `path_provider` from
`.symlinks/plugins/path_provider/ios`
-> Fetching podspec for `shared_preferences` from
`.symlinks/plugins/shared_preferences/ios`
-> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios`
-> Fetching podspec for `url_launcher` from
`.symlinks/plugins/url_launcher/ios`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local
because checking is only performed in repo update
Comparing resolved specification to the sandbox manifest
A FMDB
A Flutter
A GTMSessionFetcher
A GoogleSignIn
A GoogleToolboxForMac
A MTBBarcodeScanner
A barcode_scan
A flutter_webview_plugin
A google_sign_in
A path_provider
A shared_preferences
A sqflite
A url_launcher
Downloading dependencies
-> Installing FMDB (2.7.5)
> Copying FMDB from
`~/Library/Caches/CocoaPods/Pods/Release/FMDB/2.7.5-2ce
00` to `Pods/FMDB`
-> Installing Flutter (1.0.0)
-> Installing GTMSessionFetcher (1.2.2)
> Copying GTMSessionFetcher from
`~/Caches/CocoaPods/Pods/Release/GTMSessionFetc
her/1.2.2-61bb0` to `Pods/GTMSessionFetcher`
-> Installing GoogleSignIn (4.4.0)
> Copying GoogleSignIn from
`~/Library/Caches/CocoaPods/Pods/Release/GoogleSignIn/4
.4.0-7ff24` to `Pods/GoogleSignIn`
-> Installing GoogleToolboxForMac (2.2.1)
> Copying GoogleToolboxForMac from
`~/Library/Caches/CocoaPods/Pods/Release/GoogleToolboxF
orMac/2.2.1-b3553` to `Pods/GoogleToolboxForMac`
-> Installing MTBBarcodeScanner (5.0.11)
> Copying MTBBarcodeScanner from
`~/Library/Caches/CocoaPods/Pods/Release/MTBBarcodeScan
ner/5.0.11-f453b` to `Pods/MTBBarcodeScanner`
-> Installing barcode_scan (0.0.1)
-> Installing flutter_webview_plugin (0.0.1)
-> Installing google_sign_in (0.0.1)
-> Installing path_provider (0.0.1)
-> Installing shared_preferences (0.0.1)
-> Installing sqflite (0.0.1)
-> Installing url_launcher (0.0.1)
- Running pre install hooks
[!] The 'Pods-Runner' target has transitive dependencies that include
statically linked binaries:
(<flutter_project_repo>/ios/.symlinks/flutter/ios/Flutte
r.framework)
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
target_validator.rb:84:in `block (2 levels) in
verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
target_validator.rb:74:in `each_key'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
target_validator.rb:74:in `block in
verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
target_validator.rb:73:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
target_validator.rb:73:in
`verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
target_validator.rb:38:in `validate!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer.rb:590
:in `validate_targets'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer.rb:158
:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/command/install.
rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:334:in
`run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/command.rb:52:in
`run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/bin/pod:55:in `<top
(required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error output from CocoaPods:
↳
[!] Automatically assigning platform `iOS` with version `8.0` on target
`Runner` because no platform was specified. Please specify a platform for
this target in your Podfile. See
`https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
Error launching application on iPhone 11 Pro Max.
I also updated a bunch of different programs like cocoapods and rubygems.
I think it has something to do with one of these installations:
-> Installing MTBBarcodeScanner (5.0.11)
> Copying MTBBarcodeScanner from
`~/Library/Caches/CocoaPods/Pods/Release/MTBBarcodeScan
ner/5.0.11-f453b` to `Pods/MTBBarcodeScanner`
-> Installing barcode_scan (0.0.1)
Because it uses the versions in my pubspec.yaml,
then just start using 0.0.1 for some reason.
pubspec.yaml
...
version: 1.0.0+1
environment:
sdk: ">=2.2.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
easy_localization: ^1.3.1
...
flutter run
Error running pod install
Not sure what else I can do to get a better error message...
You can see the error in the message
[!] Automatically assigning platform `iOS` with version `8.0` on target
`Runner` because no platform was specified. Please specify a platform for
this target in your Podfile.
So, go to the file ios/Podfile inside your project, find there the line
# platform :ios, '9.0'
and uncomment it.
After that delete ios/Podfile.lock file and run project again (or pod update)
cd ios/
rm Podfile.lock
pod install
pod repo update
run this code on the terminal
sudo arch -x86_64 gem install ffi
Next, go to the ios folder in your project, and open Podfile.
find there the line
#platform :ios, '9.0'
remove the # and change the 9.0 to 10.0, and the final code should be like the below
platform :ios, '10.0'

Firebase not working anymore on iOS flutter

Im building a small project with firebase it used to work on both iOS and android emulator but since couple of days ago its not working anymore on iOS and after pod install it shows this error:
Running pod install...
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Finding Podfile changes
- Flutter
- cloud_firestore
- firebase_auth
- firebase_core
Fetching external sources
-> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
-> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
Resolving dependencies of `Podfile`
Setting up CocoaPods master repo
$ /usr/bin/git remote set-url origin https://github.com/CocoaPods/Specs.git
[!] Failed: /usr/bin/git remote set-url origin https://github.com/CocoaPods/Specs.git
$ /usr/bin/git checkout master
[!] Failed: /usr/bin/git checkout master
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.
(The `master` repo is not a git repo.)
You can try adding it manually in `/Users/myname/.cocoapods/repos` or via `pod repo add`.
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/sources_manager.rb:40:in `rescue in find_or_create_source_with_url'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/sources_manager.rb:43:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:173:in `block in sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:172:in `map'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:172:in `sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:938:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:937:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:118:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:398:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:221:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:220:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/command/install.rb:51:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'
Error output from CocoaPods:
↳
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
Error running pod install
Error launching application on iPhone Xʀ.

Resources