I'm working on a Flutter project that uses the sentry_flutter package. When I try to run pod install inside the ios directory, I get the following error:
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Sentry/HybridSDK":
In Podfile:
sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`) was resolved to 8.13.2, which depends on
Sentry/HybridSDK (= 8.44.0)
None of your spec sources contain a spec satisfying the dependency: `Sentry/HybridSDK (= 8.44.0)`.
What I've Tried: Running pod repo update and pod install --repo-update Cleaning the project with flutter clean Checking my ios/Podfile for any version mismatches Despite these steps, the issue persists. How can I resolve this and successfully install my dependencies?
The error occurs because CocoaPods cannot find the Sentry/HybridSDK dependency (version 8.44.0) in its local repo. Here’s how you can fix it:
sudo gem install cocoapods
pod repo update
cd ios
rm -rf Pods
Podfile.lock
pod install --repo-update
cd ..
flutter clean
flutter pub get
After running these steps, pod install should work correctly.🚀