skip to Main Content

I upgraded my MacOS M1 version to macOS Sonoma 14.0. After the upgrade I was forced to update my XCode too. Now I have Xcode version 15.0.

Before I upgraded my Os and updated my Xcode, my iPhone 14 emulator and ios 16.6.1 physical device were working perfectly on my flutter project. Now after the upgrade and update (iPhone Pro max emulator now), none of these work.

Whenever I run the devices it gives me this

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

Error running pod install
Error launching application on iPhone 15 Pro Max.

I tried to run pod repo update both on terminal and on root project but it gives me this

Updating spec repo `trunk`

CocoaPods 1.13.0 is available.
To update use: `gem install cocoapods`

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.13.0

When I run gem install cocoapods it gives me this

Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

I also tried gem pristine ffi --version 1.15.5 but also giving me the same error

2

Answers


  1. 1. Use Homebrew to Install CocoaPods:

    First, let’s use Homebrew to install CocoaPods, which will help manage dependencies and avoid permission issues:

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

    This will install CocoaPods without requiring sudo and should not run into permission problems.

    2. Update CocoaPods Specs:

    pod repo update
    

    3. Update Your Flutter Project:

    flutter clean
    flutter pub get
    

    This will clean the project and fetch the updated dependencies.

    4. Run Your Flutter Project:

    Try running your Flutter project on the iOS simulator or physical device again:

    flutter run
    

    I hope this will help you.

    Login or Signup to reply.
  2. Hey i experience it just this morning. In my case, i ussualy use vscode to open ios simulator, but this morning there’s no iOS simulator option. Try this answer https://stackoverflow.com/a/69914423/12566347 . This answer fix mine. Since i can’t comment in your question so i put this in answer section. Hope its help, thank you.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search