Upgraded to Flutter 3.7. M1 mac - have Pod Install Issue - flutter

I upgraded flutter via flutter upgrade to 3.7. And now im getting the following issue when I flutter build macos my application.
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
In snapshot (Podfile.lock):
Firebase/CoreOnly (= 9.3.0, ~> 9.3.0)
In Podfile:
firebase_auth (from `Flutter/ephemeral/.symlinks/plugins/firebase_auth/macos`) was resolved to 3.11.2, which depends on
Firebase/CoreOnly (~> 9.6.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_auth`.
You should run `pod update Firebase/CoreOnly` to apply changes you've made.
I have tried every suggestion such as
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
arch -x86_64 pod install --repo-update
Deleting Podfiles.
Deleting PodLock.
Has someone else come across the same issue and have a resolution for me by any chance?
To be able to flutter clean and build my application with flutter 3.7

Solution: It was to do with the version of Firebase, seemed to be conflicting issues with version and depednecies. In the Podspec replace each firebase related item as follows:
firebase_core: ^1.20.1
TO
firebase_core: 1.20.1

Related

cocoapods intallation Errors in mac for flutter doctor

I install Homebrew.
Then I run command
"brew install cocoapods". It install successfully
but in flutter doctor i got error: cocoapods installed but not working properly. Error because of ruby incompatible version.
Tried another method
"sudo gem install cocoapods"
and got error:
While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.
This is m1 pro 2020 machine.
For MAC M1 chip Users try this solution
install ffi first (if not) In regular terminal using command: sudo arch -x86_64 gem install ffi then arch -x86_64 pod install --repo-update
Run flutter clean
Once complete, rebuild your Flutter application: flutter run
Try to avoid linking with system ruby and download a new ruby version using brew:
brew install ruby
Then add this line to .bash_profile or .zshrc
export PATH=/usr/local/opt/ruby/bin:$PATH
Close the terminal and open it again, then run this line to make sure the default ruby is the newly installed:
which ruby
Uninstall gem cocoapods and download it using brew
brew install cocoapods

Installing Flutter using Homebrew

I would like to install Flutter on my Apple M1 machine using Homebrew. But I am a bit hesitant because I am not sure if this will provide any benefits or it will create more trouble (e.g. permission issues). An alternative way would to be install Flutter using its installer from its docs.
My question is, is there a recommended way to install Flutter on an Apple M1 macbook? I could not find any docs regarding installing Flutter using Homebrew.
I ended up installing Flutter in with the following steps:
Install Homebrew (if you dont already have)* - install Homebrew
Install fvm using Homebrew - install fvm
Install your wanted flutter version through fvm - fvm documentation
Not necessary: Install Sidekick which basically gives you a visualization of your installed versions and flutter projects - install sidekick
Example of using fvm: fvm install {version} - # Installs specific version
#ilpianoforte Does a great job outlining the steps, but I needed to do an additional step for macOS 13.x. So, I thought I would consolidate here.
To install Flutter via Homebrew.
Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install fvm with Homebrew (this manages multiple versions of Flutter)
brew tap leoafarias/fvm
brew install fvm
Install the latest stable version of Flutter
fvm install stable
Append the path to Flutter to PATH by copying the line below into .zshrc (located in the home directory). IMPORTANT: Make sure to replace [USER_HERE] with your user name.
export PATH=$PATH:"/Users/[USER_HERE]/fvm/default/bin"
Reload .zshrc
source ~/.zshrc
Optional: Test Flutter installation.
flutter doctor

Flutter: How to solve this Cocoapods version problem?

The App is working perfectly on Android but on iOS it shows me this Error when I try to launch:
Warning: CocoaPods minimum required version 1.9.0 or greater not installed. Skipping pod install.
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.
CocoaPods not installed or not in valid state.
Error launching application on iPhone 13.
And I'm actually shocked by this Flutter command of Cocoapods version 1.9.0! because I have just installed the latest Cocoapods version which is 1.5.2 on GitHub through brew install cocoapods.
Did someone face this problem before?
Please help :'(!
Solved it by:
Uninstall Hebrew completely from Mac.
Install rvm.
Install latest ruby version through rvm.
Install cocoapods---> sudo gem install cocoapods.

Flutter CocoaPods could not find compatible versions for pod OneSignalXCFramework

on running pod install there is appearing following error
[!] CocoaPods could not find compatible versions for pod "OneSignalXCFramework":
In Podfile:
onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`) was resolved to 3.2.7, which depends on
OneSignalXCFramework (= 3.9.1)
None of your spec sources contain a spec satisfying the dependency: `OneSignalXCFramework (= 3.9.1)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
try running the following command
cd ios/
pod repo update
rm -rf Podfile.lock Pods
pod install

Any ideas how to install 'ReachabilitySwift' for swift 3?

I have tried to install :
pod 'ReachabilitySwift', '~> 3'
into my Podfile, but I get this error:
[!] Unable to satisfy the following requirements:
ReachabilitySwift (~> 3) required by Podfile
None of your spec sources contain a spec satisfying the dependency: ReachabilitySwift (~> 3).
You have either:
* out-of-date source repos which you can update with pod repo update.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.
Any ideas how can I install it , I also tried manually, but it didn't work too.
P.S I am using CocoaPods
after updating:
CocoaPods 1.1.0.rc.2 is available.
To update use: sudo gem install cocoapods --pre
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.1.0.rc.2
Analyzing dependencies
Pre-downloading: SwiftyJSON from https://github.com/BaiduHiDeviOS/SwiftyJSON.git, branch swift3
Downloading dependencies
Installing ReachabilitySwift 3 (was 2.3.3)
Using SVProgressHUD (2.0.3)
Installing SwiftyJSON 2.3.2 (was 2.3.2)
Generating Pods project
Integrating client project
Pod installation complete! There are 3 dependencies from the Podfile and 3 total
pods installed.
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
Ivans-Air-2:popo IvanDosevDimitrov$
Just run sudo gem install cocoapods and then pod updateafter that.