Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CocoaPods could not find compatible versions for pod "Analytics" #62

Closed
patrick-samy opened this issue Nov 29, 2020 · 2 comments
Closed

Comments

@patrick-samy
Copy link

Hello,

After updating my react-native-firebase packages to the latest version to fix a crash on iOS 14.2 detected by the Apple review team, it seems like I now have a conflict in dependencies.

Running pod install leads to a conflict and I've tried cleaning up node_modules, Podfile.lock and the Pods directory as well as every other solution I found on previous issues that were similar without success.

Any ideas how to override the Analytics and nanopb versions in the Analytics pods and its dependencies to reflect newer versions?

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

  In Podfile:
    RNAnalytics (from `../node_modules/@segment/analytics-react-native`) was resolved to 1.3.2, which depends on
      Analytics (~> 4.1)

    RNAnalyticsIntegration-Firebase (from `../node_modules/@segment/analytics-react-native-firebase`) was resolved to 1.3.2, which depends on
      Analytics

    RNAnalyticsIntegration-Firebase (from `../node_modules/@segment/analytics-react-native-firebase`) was resolved to 1.3.2, which depends on
      Segment-Firebase was resolved to 2.4.1, which depends on
        Analytics (~> 3.2)


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 `Analytics` inside your development pod `RNAnalyticsIntegration-Firebase`.
   You should run `pod update Analytics` to apply changes you've made.
CocoaPods could not find compatible versions for pod "nanopb":
  In snapshot (Podfile.lock):
    nanopb (= 2.30906.0, ~> 2.30906.0)

  In Podfile:
    RNAnalyticsIntegration-Firebase (from `../node_modules/@segment/analytics-react-native-firebase`) was resolved to 1.3.2, which depends on
      Segment-Firebase was resolved to 2.7.0, which depends on
        FirebaseAnalytics (~> 6.1) was resolved to 6.1.2, which depends on
          nanopb (~> 0.3)

    RNFBCrashlytics (from `../node_modules/@react-native-firebase/crashlytics`) was resolved to 10.1.0, which depends on
      Firebase/Crashlytics (~> 7.1.0) was resolved to 7.1.0, which depends on
        FirebaseCrashlytics (~> 7.1.0) was resolved to 7.1.0, which depends on
          nanopb (~> 2.30906.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 `nanopb` inside your development pod `RNAnalyticsIntegration-Firebase`.
   You should run `pod update nanopb` to apply changes you've made.

package.json

 21         "@react-native-firebase/app": "^10.1.0",                                                                                                           
 22         "@react-native-firebase/auth": "^10.1.0",                                                                                                          
 23         "@react-native-firebase/crashlytics": "^10.1.0",                                                                                                   
 24         "@react-native-firebase/dynamic-links": "^10.1.0",                                                                                                 
 25         "@react-native-firebase/in-app-messaging": "^10.1.0",                                                                                              
 26         "@react-native-firebase/messaging": "^10.1.0",                                                                                                     
 27         "@react-native-firebase/remote-config": "^10.1.0",                                                                                                 
 31         "@segment/analytics-react-native": "^1.3.2",                                                                                                       
 32         "@segment/analytics-react-native-firebase": "^1.3.2",

Podfile

  1 platform :ios, '11.0'                                                                                                                                      
  2 require_relative '../node_modules/react-native/scripts/react_native_pods'                                                                                  
  3 require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'                                                                 
  4                                                                                                                                                            
  5 target 'app' do                                                                                                                                            
  6     config = use_native_modules!                                                                                                                           
  7     use_react_native!(:path => config["reactNativePath"])                                                                                                  
  8                                                                                                                                                            
  9     pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"                                                                     
 10     pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"                                                           
 11     pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"                                                                       
 12     pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"                                                                      
 13                                                                                                                                                            
 14     pod 'Intercom'                                                                                                                                         
 15     pod 'GoogleSignIn'                                                                                                                                     
 16     pod 'Stripe', '~> 19.0.1'                                                                                                                                                                                                                                                                 
 25                                                                                                                                                            
 26     target 'appTests' do                                                                                                                                   
 27         inherit! :search_paths                                                                                                                             
 28     end                                                                                                                                                    
 29                                                                                                                                                            
 30     # Enables Flipper.                                                                                                                                     
 31     #                                                                                                                                                      
 32     # Note that if you have use_frameworks! enabled, Flipper will not work and                                                                             
 33     # you should disable these next few lines.                                                                                                             
 34     use_flipper!                                                                                                                                           
 35     post_install do |installer|                                                                                                                            
 36         flipper_post_install(installer)                                                                                                                    
 37     end                                                                                                                                                    
 38                                                                                                                                                                                                                                                                                                               
 39 end 
@patrick-samy
Copy link
Author

patrick-samy commented Dec 3, 2020

My workaround for now is to checkout master on this repo, change the .podspec file to reflect new versions, and reference the local path for the pod in my Podfile.

Disclaimer: I'm not entirely sure that Firebase is receiving analytics yet with this fix.

Podfile

pod 'Segment-Firebase', :path => "../node_modules/@segment/analytics-react-native-firebase/segment-firebase"

Segment-Firebase.podspec

26   s.dependency 'Analytics'                                                                                                                                 
27   s.dependency 'Firebase/Core', '~> 7.1'                                                                                                                   
28   s.dependency 'FirebaseAnalytics','~> 7.1'

@alanjcharles
Copy link
Contributor

@patrick-samy please upgrade to analytics-react-native 1.4.4 . If the issue persists, please feel free to report your issue on that repository and i'll take a closer look. Currently, the analytics-react-native library compiles and generates all of the React Native Destinations, so it will help to keep things organized there. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants