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. Use Homebrew to Install CocoaPods:
First, let’s use Homebrew to install CocoaPods, which will help manage dependencies and avoid permission issues:
This will install CocoaPods without requiring sudo and should not run into permission problems.
2. Update CocoaPods Specs:
3. Update Your Flutter Project:
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:
I hope this will help you.
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.