Error running pod install flutter

Hi, Path_provider stops app from building on iOS Simulator. It throws an error. see full details in this post: CocoaPods/CocoaPods#10028 I am running into the same thing and after reading a few pos...

Hi @BlickwinkelTour
Just tried to reproduce on the stable, had no issues with pod install either from IDE or command line

logs

                    you can provide.
[ +259 ms] executing: xcrun simctl install DC25925E-876C-4CFE-A2F7-0640782D22A5
/Users/tahatesser/AndroidStudioProjects/stable_flutter/build/ios/iphonesimulator/Runner.app
[ +671 ms] executing: /usr/bin/plutil -convert json -o -
/Users/tahatesser/AndroidStudioProjects/stable_flutter/build/ios/iphonesimulator/Runner.app/Info.plist
[  +13 ms] Exit code 0 from: /usr/bin/plutil -convert json -o -
/Users/tahatesser/AndroidStudioProjects/stable_flutter/build/ios/iphonesimulator/Runner.app/Info.plist
[        ]
{"CFBundleName":"triage","DTXcode":"1230","DTSDKName":"iphonesimulator14.3","UILaunchStoryboardName":"LaunchScreen","CFBundleIcons~i
pad":{"CFBundlePrimaryIcon":{"CFBundleIconFiles":["AppIcon20x20","AppIcon29x29","AppIcon40x40","AppIcon60x60","AppIcon76x76","AppIco
n83.5x83.5"],"CFBundleIconName":"AppIcon"}},"DTSDKBuild":"18C61","CFBundleDevelopmentRegion":"en","CFBundleVersion":"1","BuildMachin
eOSBuild":"20C69","DTPlatformName":"iphonesimulator","CFBundlePackageType":"APPL","UIMainStoryboardFile":"Main","CFBundleSupportedPl
atforms":["iPhoneSimulator"],"CFBundleShortVersionString":"1.0.0","CFBundleInfoDictionaryVersion":"6.0","CFBundleExecutable":"Runner
","DTCompiler":"com.apple.compilers.llvm.clang.1_0","UISupportedInterfaceOrientations~ipad":["UIInterfaceOrientationPortrait","UIInt
erfaceOrientationPortraitUpsideDown","UIInterfaceOrientationLandscapeLeft","UIInterfaceOrientationLandscapeRight"],"MinimumOSVersion
":"9.0","CFBundleIdentifier":"com.nevercode.triage","UIDeviceFamily":[1,2],"DTPlatformVersion":"14.3","CFBundleSignature":"????","CF
BundleIcons":{"CFBundlePrimaryIcon":{"CFBundleIconFiles":["AppIcon20x20","AppIcon29x29","AppIcon40x40","AppIcon60x60"],"CFBundleIcon
Name":"AppIcon"}},"DTXcodeBuild":"12C33","LSRequiresIPhoneOS":true,"UISupportedInterfaceOrientations":["UIInterfaceOrientationPortra
it","UIInterfaceOrientationLandscapeLeft","UIInterfaceOrientationLandscapeRight"],"UIViewControllerBasedStatusBarAppearance":false,"
NSBonjourServices":["_dartobservatory._tcp"],"DTPlatformBuild":"18C61","NSLocalNetworkUsageDescription":"Allow Flutter tools on your
computer to connect and debug your application. This prompt will not appear on release builds."}
[   +4 ms] executing: xcrun simctl launch DC25925E-876C-4CFE-A2F7-0640782D22A5 com.nevercode.triage --enable-dart-profiling
--enable-checked-mode --verify-entry-points --observatory-port=0
[ +257 ms] com.nevercode.triage: 16663
[        ] Waiting for observatory port to be available...
[ +458 ms] Observatory URL on device: http://127.0.0.1:54710/RuGSztBZOQc=/
[   +3 ms] Caching compiled dill
[ +104 ms] Connecting to service protocol: http://127.0.0.1:54710/RuGSztBZOQc=/
[   +4 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at
http://127.0.0.1:54710/RuGSztBZOQc=/.
[ +235 ms] DDS is listening at http://127.0.0.1:54712/cHUtNMCzy-4=/.
[  +70 ms] Successfully connected to service protocol: http://127.0.0.1:54710/RuGSztBZOQc=/
[  +13 ms] DevFS: Creating new filesystem on the device (null)
[  +19 ms] DevFS: Created new filesystem on the device
(file:///Users/tahatesser/Library/Developer/CoreSimulator/Devices/DC25925E-876C-4CFE-A2F7-0640782D22A5/data/Containers/Data/Applicat
ion/02E591DC-1809-4498-999C-9F299771CA69/tmp/stable_flutterTwvmlE/stable_flutter/)
[   +1 ms] Updating assets
[ +101 ms] Syncing files to device iPhone 12 Pro Max...
[   +1 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[   +4 ms] <- recompile package:triage/main.dart 80534937-066e-432a-b8e3-27a831a2db43
[        ] <- 80534937-066e-432a-b8e3-27a831a2db43
[ +157 ms] Updating files.
[        ] DevFS: Sync finished
[        ] Syncing files to device iPhone 12 Pro Max... (completed in 164ms)
[        ] Synced 0.0MB.
[   +1 ms] <- accept
[   +5 ms] Connected to _flutterView/0x7fe26c826820.
[   +1 ms] Flutter run key commands.
[   +1 ms] r Hot reload. 🔥🔥🔥
[   +1 ms] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on iPhone 12 Pro Max is available at: http://127.0.0.1:54712/cHUtNMCzy-4=/
[        ] Running with unsound null safety
[        ] For more information see https://dart.dev/null-safety/unsound-null-safety

flutter doctor -v

[✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.22.5 at /Users/tahatesser/Code/flutter_stable
    • Framework revision 7891006299 (7 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/SDK
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.1

[✓] Connected device (2 available)
    • Taha’s iPad (mobile)       • 00008020-000255113EE8402E            • ios • iOS 14.3
    • iPhone 12 Pro Max (mobile) • DC25925E-876C-4CFE-A2F7-0640782D22A5 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)

! Doctor found issues in 1 category.

Can you please provide your flutter doctor -v your flutter run --verbose logs with pod install error
Thank you

idawnwon

Environment

macOS: 10.15.7
Xcode: 12.2, Build version 12B45b
Android Studio: 4.1.1

I made an app in Android Studio, it compiles fine. But a lot trouble happened after I add cloud_firestore.

The issue

I added

firebase_core: ^0.5.2+1
firebase_auth: ^0.18.3+1
cloud_firestore: ^0.14.3+1

Enter fullscreen mode

Exit fullscreen mode

to pubspec.yaml, run app, it says Error running pod install.

1st try

I thought it’s maybe the versions issue, so I downgrade each one to

firebase_core: ^0.3.4
firebase_auth: ^0.8.4+4
cloud_firestore: ^0.9.13+1

Enter fullscreen mode

Exit fullscreen mode

Same issue.

2nd try

Then I folloed Paresh Mangukiya’s answer to try something further

### Open terminal, go to the project's folder
cd /ios
rm Podfile.lock
pod install --repo-update
flutter clean

Enter fullscreen mode

Exit fullscreen mode

3rd try

Then I add the three dependencies one by one.

First added firebase_core: ^0.5.2+1, run app in simulator, OK.
Second added firebase_auth: ^0.18.3+1, run app, it says

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
  pod repo update

Enter fullscreen mode

Exit fullscreen mode

Run pod repo update, then run app again, OK.

4th try

Next added cloud_firestore: ^0.9.13+1, run app, it says Error running pod install again, without any more info.

5th try

Then I believe it’s the problem of cocoapods itself. I followed neilco’s answer to fully uninstall cocoapods

gem list --local | grep cocoapods
sudo gem uninstall EACH_OF_THEM
rm -rf ~/.cocoapods

Enter fullscreen mode

Exit fullscreen mode

6th try

Then, I installed homebrew and reinstalled cocoapods

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install cocoapods

Enter fullscreen mode

Exit fullscreen mode

7th try

After that, redo the steps

### Open terminal, go to the project's folder
cd /ios
rm Podfile.lock
pod install --repo-update

Enter fullscreen mode

Exit fullscreen mode

It stuck at Installing BoringSSL-GRPC (0.0.7). I waited about 1 hour, it still stuck there.

8th try

After read Nitish Kumar Singh’s post, I know

It downloads more than 1 GB of data when you Firebase(Firestore) to the Flutter Project. This is the reason why it took so long to finish.

After about 3 hours, downloaded a bunch of dependencies

Installing BoringSSL-GRPC (0.0.7)
Installing Firebase (6.33.0)
Installing FirebaseAuth (6.9.2)
Installing FirebaseCore (6.10.3)
Installing FirebaseCoreDiagnostics (1.7.0)
Installing FirebaseFirestore (1.18.0)
Installing Flutter (1.0.0)
Installing GTMSessionFetcher (1.5.0)
Installing GoogleDataTransport (7.5.1)
Installing GoogleUtilities (6.7.2)
Installing PromisesObjC (1.2.11)
Installing abseil (0.20200225.0)
Installing cloud_firestore (0.14.3-1)
Installing firebase_auth (0.18.3-1)
Installing firebase_core (0.5.2-1)
Installing gRPC-C++ (1.28.2)
Installing gRPC-Core (1.28.2)
Installing leveldb-library (1.22)
Installing nanopb (1.30906.0)

Enter fullscreen mode

Exit fullscreen mode

After a crazy 232.2s build time, run successfully.

Conclusion

Actually I am still not sure what caused the issue after all. But reinstall cocoapods helps in my case.

Hope this helps!
So proud to be a coder!

Issue

I get the below error/log when i implement the google_sign_in package to my flutter application.
I’m using m1 chip. all the packages, flutter framework and xcode at their last versions.

Flutter project dependencies:

  • http: ^0.13.4
  • firebase_auth: ^3.3.6
  • google_sign_in: ^5.2.3

At the first i got this:



    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`.


Then I’ve uncomment this platform :ios, ‘9.0’ at ios/Podfile

But different error shows up like this:



    Launching lib/main.dart on iPhone 13 in debug mode...
    lib/main.dart:1
    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 `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
        firebase_auth: Using Firebase SDK version '8.11.0' defined in 'firebase_core'
        -> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
        firebase_core: Using Firebase SDK version '8.11.0' defined in 'firebase_core'
        -> Fetching podspec for `google_sign_in` from `.symlinks/plugins/google_sign_in/ios`
        Resolving dependencies of `Podfile`
    Error output from CocoaPods:
    ↳
        /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle' **(mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))**, '/usr/lib/ffi_c.bundle' (no such file) - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle (LoadError)
            from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
            from /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi.rb:5:in `rescue in '
            from /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi.rb:2:in `'
    2
            from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
            from /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon.rb:3:in `'
    2
            from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
            from /Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `'
    2
            from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    ...


I think because of the m1 chip that i using, according to this error message (mach-o file, but is an incompatible architecture (have ‘arm64’, need ‘x86_64’))
Does anyone have an idea about this issue?

Also, the below subjects’ answers didn’t work for me.

Flutter Error running pod install After Upgrading Flutter version

Flutter pod install issue and ios app not running

https://github.com/CocoaPods/CocoaPods/issues/10127#issuecomment-705741320

Solution

Use these commands in your project files to manually install pod files:

  1. cd ios

  2. arch -x86_64 pod install

  3. cd ..

  4. flutter run

Answered By – CidQu

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

I am not an iOS developer, so CocoaPods errors are foreign to me. I’ll  document the common errors I get and how I fixed them for future reference.

Nov 2019: pod update

Once I tried to compile my app, and suddenly I got these errors:

    [!] CocoaPods could not find compatible versions for pod "GoogleSignIn":
      In snapshot (Podfile.lock):
        GoogleSignIn (= 4.4.0, ~> 4.0)

      In Podfile:
        google_sign_in (from `.symlinks/plugins/google_sign_in/ios`) was resolved to 0.0.1, which depends on
          GoogleSignIn (~> 5.0)


    You have either:
     * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
     * changed the constraints of dependency `GoogleSignIn` inside your development pod `google_sign_in`.
       You should run `pod update GoogleSignIn` to apply changes you've made.

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
  pod repo update

So I ran pod repo update:

% cd ios
ios % pod repo update
Updating spec repo `master`
  $ /usr/local/bin/git -C /Users/myself/.cocoapods/repos/master fetch origin --progress
  remote: Enumerating objects: 154844, done.        
  remote: Counting objects: 100% (154844/154844), done.        
  remote: Compressing objects: 100% (222/222), done.        
  remote: Total 1011555 (delta 154697), reused 154608 (delta 154608), pack-reused 856711        
  Receiving objects: 100% (1011555/1011555), 112.51 MiB | 4.63 MiB/s, done.
  Resolving deltas: 100% (662823/662823), completed with 29957 local objects.
  From https://github.com/CocoaPods/Specs
     b1c83eec505..7a54ba26aa5  master       -> origin/master
   * [new branch]              cdn_scripts  -> origin/cdn_scripts
   * [new branch]              indexes      -> origin/indexes
   * [new branch]              netlify      -> origin/netlify
   * [new branch]              orta-patch-1 -> origin/orta-patch-1
  $ /usr/local/bin/git -C /Users/myself/.cocoapods/repos/master rev-parse --abbrev-ref HEAD
  master
  $ /usr/local/bin/git -C /Users/myself/.cocoapods/repos/master reset --hard origin/master
  HEAD is now at 7a54ba26aa5 [Add] EasyRest 1.2.0
Updating spec repo `trunk`

Building still didn’t work, giving me the same error telling me to run pod repo update.

❌  error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

So this time I tried pod install and pod install --repo-update:

% cd ios
ios % pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "GoogleSignIn":
  In snapshot (Podfile.lock):
    GoogleSignIn (= 4.4.0, ~> 4.0)

  In Podfile:
    google_sign_in (from `.symlinks/plugins/google_sign_in/ios`) was resolved to 0.0.1, which depends on
      GoogleSignIn (~> 5.0)


You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `GoogleSignIn` inside your development pod `google_sign_in`.
   You should run `pod update GoogleSignIn` to apply changes you've made.

[!] 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`.

ios % pod install --repo-update
Updating local specs repositories
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "GoogleSignIn":
  In snapshot (Podfile.lock):
    GoogleSignIn (= 4.4.0, ~> 4.0)

  In Podfile:
    google_sign_in (from `.symlinks/plugins/google_sign_in/ios`) was resolved to 0.0.1, which depends on
      GoogleSignIn (~> 5.0)


You have either:
 * changed the constraints of dependency `GoogleSignIn` inside your development pod `google_sign_in`.
   You should run `pod update GoogleSignIn` to apply changes you've made.

It’s only after running pod update GoogleSignIn that things started to look green:

% pod update GoogleSignIn
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AppAuth (1.3.0)
Installing BoringSSL-GRPC (0.0.3)
Installing FMDB (2.7.5)
Installing Firebase (6.12.0)
Installing FirebaseAnalytics (6.1.5)
Installing FirebaseAuth (6.3.1)
Installing FirebaseAuthInterop (1.0.0)
Installing FirebaseCore (6.3.3)
Installing FirebaseCoreDiagnostics (1.1.1)
Installing FirebaseCoreDiagnosticsInterop (1.1.0)
Installing FirebaseFirestore (1.7.0)
Installing FirebaseInstanceID (4.2.7)
Installing FirebaseStorage (3.4.1)
Installing Flutter (1.0.0)
Installing GTMAppAuth (1.0.0)
Installing GTMSessionFetcher (1.3.0)
Installing GoogleAppMeasurement (6.1.5)
Installing GoogleDataTransport (3.0.1)
Installing GoogleDataTransportCCTSupport (1.2.1)
Installing GoogleSignIn (5.0.2)
Installing GoogleUtilities (6.3.1)
Installing Protobuf (3.10.0)
Installing cloud_firestore (0.0.1)
Installing firebase_analytics (0.0.1)
Installing firebase_auth (0.0.1)
Installing firebase_core (0.0.1)
Installing firebase_storage (0.0.1)
Installing flutter_sound (0.0.1)
Installing flutter_tts (0.0.1)
Installing gRPC-C++ (0.0.9)
Installing gRPC-Core (1.21.0)
Installing google_sign_in (0.0.1)
Installing leveldb-library (1.22)
Installing nanopb (0.3.9011)
Installing path_provider (0.0.1)
Installing permission_handler (3.3.0)
Installing share (0.5.2)
Installing sqflite (0.0.1)
Installing url_launcher (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 14 dependencies from the Podfile and 39 total pods installed.

[!] 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`.

Trying to compile again, I get a different error:

% flutter build ios --release --no-codesign
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building com.myorg.myapp for device (ios-release)...
 
Running pod install...                                              9.2s
Warning: Podfile is out of date
  This can cause a mismatched version of Flutter to be embedded in your app, which may result in App Store submission rejection or crashes.
  If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/24641 for instructions.
To regenerate the Podfile, run:
  rm ios/Podfile

It’s only after removing ios/Podfile that it finally compiled:

% rm ios/Podfile
% flutter build ios --release --no-codesign
 
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building com.myorg.myapp for device (ios-release)...
 
Running pod install...                                             10.8s
Running Xcode build...                                                  
                                                   
 ├─Building Dart code...                                         
  138.6s (!)                                       
 ├─Generating dSYM file...                                   2.4s
 ├─Stripping debug symbols...                                1.4s
 ├─Assembling Flutter resources...                           2.2s
 └─Compiling, linking and signing...                        83.8s
Xcode build done.                                           693.6s
Built /Users/myself/.../build/ios/iphoneos/Runner.app.

If this was the only step required, I wish it had told me from the start.

May 2020: incompatible Firebase libs

After upgrading Firebase versions in my pubspec.yaml, things were still fine in Android, but started breaking in iOS. pod install would fail with this error:

[!] CocoaPods could not find compatible versions for pod "Firebase/Auth":
  In snapshot (Podfile.lock):
    Firebase/Auth (= 6.34.0, ~> 6.3)

  In Podfile:
    firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 1.1.4, which depends on
      Firebase/Auth (= 7.11.0)

Specs satisfying the `Firebase/Auth (= 6.34.0, ~> 6.3), Firebase/Auth (= 7.11.0)` dependency were found, but they required a higher minimum deployment target.

Not sure what they mean by higher minimum deployment target. My Podfile already specified deployment target 10, which should be sufficient, and the iOS specific Firebase docs (https://firebase.google.com/support/release-notes/ios#version_7110_-_april_20_2021) didn’t mention a deployment target to change.

So I tried the same trick as last year, using pod update package_name. When I ran pub update Firebase/Auth, I got this error:

LoadError — dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle — /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle

A few GitHub tickets like this one mention you should install ffi with Rosetta enabled: sudo arch -x86_64 gem install ffi. After which you should run the install or update command, also using arch: arch -x86_64 pod update Firebase/Auth.

% arch -x86_64 pod update Firebase/Auth
Updating local specs repositories
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
  In Podfile:
    firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) was resolved to 0.0.1, which depends on
      Firebase/Analytics (~> 6.0) was resolved to 6.0.0, which depends on
        Firebase/Core (= 6.0.0) was resolved to 6.0.0, which depends on
          Firebase/CoreOnly (= 6.0.0)

    firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 1.1.1, which depends on
      Firebase/CoreOnly (= 7.11.0)

So it looks like it’s because Firebase Analytics was still using a version that was too old. My pubspec.yaml looked like this:

  cloud_firestore: ^1.0.0
  firebase_analytics: ^5.0.9
  firebase_auth: ^1.0.1
  firebase_core: ^1.0.0
  firebase_storage: ^8.0.0

I can see in firebase_analytics’s release notes that in version 6.1.0, they updated Firebase iOS SDK from version 6.26.0 to 6.33.0, and in version 7.0.0, they started depending on version 7.3.0. Should I migrate all the way to 8.0.4?

After doing so, and running pod install, I got a different error:

[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
  In snapshot (Podfile.lock):
    Firebase/CoreOnly (= 6.34.0)

  In Podfile:
    firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 1.1.1, which depends on
      Firebase/CoreOnly (= 7.11.0)


You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `Firebase/CoreOnly` inside your development pod `firebase_core`.
   You should run `pod update Firebase/CoreOnly` to apply changes you've made.

So I ran arch -x86_64 pod update Firebase/CoreOnly and things started looking green.

I also checked firebase_core’s release notes. I was using version 1.0.0 I can see that in version 1.1.0, they went from the SDK 7.3 to 7.11. So version 1.0.0 is using 7.3.

I wonder what made pod use 7.11 instead of 7.3.

I have an error when I tried to launch my project on my iPhone, the basic Flutter example is working on my iPhone but when I use my project I have this error. enter image description here

10 Answers

This happens when we change any plugins versions or flutter pub package.

I was getting a similar error, so I used many different things but still nothing happened but finally I got an exact solution For the solution follow the below steps

  1. Delete the podfile.lock file from the ios folder.

  2. Open the terminal, go to the ios folder directory and run pod install. It could take some time to install.

    If pod install gives any error then try this

    pod install --repo-update 
    
  3. After everything is done run your project again

    flutter run
    

Ref:- Running pod install

I faced the same issue and none of the above work. Finally I resolved it by:

  1. Check ios/.symlinks/plugins contains extra plugin which you are not using.
  2. Delete podfile.lock in ios folder, if it exists.
  3. Delete podfile from ios folder.
  4. Delete pods folder in ios directory.
  5. Run flutter clean in the terminal.
  6. Run flutter pub get in the terminal.
  7. Run flutter runin the terminal.

I got this error when I was using Firebase in flutter, the solution for me was to set the Podfile deployment target to a iOS version higher than 9.

Example:
Changed this

#platform :ios, '9.0'

to

 platform :ios, '13.0'

Hope this help
1. change directory to your project e.g /dart/apps/abc
2. type, ‘flutter clean && pod update’

In Flutter project, I Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version.

Solution:-

  • flutter clean
  • rm -Rf ios/Pods
  • rm -Rf ios/.symlinks
  • rm -Rf ios/Flutter/Flutter.framework
  • rm -Rf ios/Flutter/Flutter.podspec
  • flutter pub get
  • cd ios
  • pod install
  • cd ..
  • flutter build ios
  • flutter run

So did you solve this problem?

I met the same situation. And this is the solution I found.
Link

Basically:

  • Locate Terminal.app in Finder. (Applications->Terminal.app)
  • Right-click and choose Get Info
  • Check the “Open using Rosetta”
  • Quit all instances of Terminal app and run it again
  • Run sudo gem install ffi

After you finish the above several steps, restart your IDE and re-run the application.
Please give a reply if this method works.

  1. Delete the podfile.lock (located in app root > ios folder)
  2. Run in Terminal pod install --repo-update
  3. flutter run

I’d the same problem, in my case when I ran pod install --verbose I realize that there was an specific error during pod install

undefined method `each_child’ for #Dir:0x00007ff10befa7f0 Did you mean? each_slice

Looking for this specific error I found this answer and I realize that I was using ruby 2.5 and one file generated by Flutter for iOS devices was trying to use a method that was introduced on version 2.6.

After follow the steps on that answer I could run my Flutter app on iOS simulator.

The method dir.each_child was introduced in Ruby 2.6, but you are using Ruby 2.3.0.

You should update Ruby to 2.6.0 or later 2.x version.

After Ruby updating you may also need to restart your IDE and re-install cocoapods.

  1. Simply delete the Podfile from your project
  2. Run this command in terminal (I did in Android studio terminal it self)
sudo gem install cocoapods
  1. And then run this
pod init

It works for me..

You can fix it with

sudo arch -x86_64 gem install ffi

Понравилась статья? Поделить с друзьями:
  • Error running pod install error launching application on iphone 12 pro max
  • Error running pipenv pycharm
  • Error running org jetbrains plugins cucumber java run cucumberjvmsmformatter
  • Error running man
  • Error running lua method update