aliasad106 / React-Native-Mopub-SDK

React native library for mopub ad network
MIT License
14 stars 24 forks source link

Incompatible with AdMob #8

Open RodolfoGS opened 4 years ago

RodolfoGS commented 4 years ago

Hi, I'm using AdMob in my project but I want to try MoPub and when I try to install the pod I get the error below.

[!] CocoaPods could not find compatible versions for pod "Google-Mobile-Ads-SDK":
  In snapshot (Podfile.lock):
    Google-Mobile-Ads-SDK (= 7.52.0, ~> 7.50)

  In Podfile:
    RNFBAdMob (from `../node_modules/@react-native-firebase/admob`) was resolved to 6.2.0, which depends on
      Firebase/AdMob (~> 6.13.0) was resolved to 6.13.0, which depends on
        Google-Mobile-Ads-SDK (~> 7.50)

    react-native-mopub-sdk (from `../node_modules/react-native-mopub-sdk`) was resolved to 1.0.0, which depends on
      react-native-mopub-sdk/AdMob (= 1.0.0) was resolved to 1.0.0, which depends on
        MoPub-AdMob-Adapters (~> 7.39.0.0) was resolved to 7.39.0.0, which depends on
          MoPub-AdMob-Adapters/Network (= 7.39.0.0) was resolved to 7.39.0.0, which depends on
            Google-Mobile-Ads-SDK (= 7.39.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 `Google-Mobile-Ads-SDK` inside your development pod `react-native-mopub-sdk`.
   You should run `pod update Google-Mobile-Ads-SDK` to apply changes you've made.

Do you know how to fix this?

Thanks!

bougarfaoui commented 4 years ago

either remove react-native-admob dependency or in node_module/react-native-mopub-sdk change 7.39.0.0 in ```ss.dependency 'MoPub-AdMob-Adapters', '~> 7.39.0.0'```` to your admob version. you can get the right version from here https://github.com/mopub/mopub-ios-mediation/blob/master/AdMob/CHANGELOG.md