Googleads-mobile-unity: Cannot find protocol declaration for 'GADRewardedAdDelegate'; did you mean 'GADNativeAdDelegate'?

Created on 9 Apr 2021  路  27Comments  路  Source: googleads/googleads-mobile-unity

I am getting 10 errors like this. Only from 'GADRewardedAd' library.
on XCode 12.4

Most helpful comment

I deleted everything under Plugins/iOS, then updated admob and it works now. I got another error, but it was easy to fix with google

All 27 comments

Having this same problem on the most recent Google Mobile Ads plugin for iOS. Mediating through ironsource

Doesn't have any solution?

Using Unity 2018.4.34f1, XCode 12.5, and Google Mobile Ads Unity Plugin v6.0.0. I am getting this exact same issue. https://github.com/googleads/googleads-mobile-unity/issues/1569 is a similar issue raised here last February it was closed but it still isn't fixed. These are the 10 issues shown in xcode when building
Screen Shot 2021-05-20 at 12 30 40 PM

@riocallos I had those same errors before I deleted the old files from the previous version of admob. But after that I get "Undefined symbol" errors when building with xcode.

Face this issue too, turn out because updating the plugin without delete old file at Plugins/iOS

I tried to remove all old files in Plugins/iOS from the last version, it still shows the same error on my Xcode.
I have also tried importing source code from 6.0.0 tag instead of release unity package, which doesn't work either.

Unity 2019.4.18
Google Mobile Ads Unity Plugin v6.0.0
Xcode 12.4

It is now somehow fixed on my side. I'm not really sure how it was fixed but I just ran pod install and then opened the xcworkspace then it was all good.

It is now somehow fixed on my side. I'm not really sure how it was fixed but I just ran pod install and then opened the xcworkspace then it was all good.

What version Unity you used?

It is now somehow fixed on my side. I'm not really sure how it was fixed but I just ran pod install and then opened the xcworkspace then it was all good.

What version Unity you used?

@thaothao0501 Unity 2018.4.34f1, XCode 12.5

Facing the same problem here. I am using Unity 2019.4.21f1 and XCode 12.4.
I just found that GoogleMobileAdsDependencies sets the version of "Google-Mobile-Ads-SDK" as ~> 7.50.
However, IronSource AdMob Adapter requires "Google-Mobile-Ads-SDK" for version >= 8.50.
So I editor GoogleMobileAdsDependencies .cs form ~> 7.50 to => 7.50
And I just found that GADRewardedAdDelegate is only for version 7.X
So when cocoapod install version 8.50 in my project. GADRewardedAdDelegate will be missing.
I don't know how to solve it instead of waiting for official update.

Changing my ads pods to:

pod 'GoogleMobileAdsMediationAppLovin', '6.14.6.0'
pod 'GoogleMobileAdsMediationFacebook', '6.2.0.0'
pod 'GoogleMobileAdsMediationUnity', '3.5.0.0'
pod 'Google-Mobile-Ads-SDK', '7.69'

Helped with this error, but instead i got:

Plugins/iOS/UnityAdsShowListener.h:8:45: No type or protocol named 'UnityAdsShowDelegate'
Plugins/iOS/UnityAdsUnityWrapper.m:79:15: No known class method for selector 'show:placementId:showDelegate:'

I guess it was related to what I changed. It's so frustrating.
Did someone manage to solve it?

Update: Deleting all mediations and setting 'Google-Mobile-Ads-SDK' to 7.69 fixed it, i can build the game. But it crashes on splash screen

I'm having this issue as well, severly blocked by it
I run no mediation

'Google-Mobile-Ads-SDK', '~>8.2'
Leads to:

  • Undefined symbol: _GADURequestInterstitial

'Google-Mobile-Ads-SDK', '7.69.0'
Leads to:

  • Undefined symbol: _GADURequestInterstitial
  • Undefined symbol: _OBJC_CLASS_$_GADInterstitialAd

Update: Deleting all mediations and setting 'Google-Mobile-Ads-SDK' to 7.69 fixed it, i can build the game. But it crashes on splash screen

Check that error message, it probably is because of no SKAdNetwork identifier in your .plist

@erikhallgren "Undefined symbol" is totally different error. I'm not an iOS expert, but as far as i remember, changing architectures, or adding -objC to linker flag might help with this.

Hey @riocallos, can you send us your podfile and podfile.lock? Or type "cat Podfile.lock" in your project's location in terminal and send us the logs. It will be really helpful

same here unity 2020.2.3f1 Xcode 12.5.1 Google Mobile Ads Unity Plugin v6.0.1
podfile.lock
PODS:

  • Google-Mobile-Ads-SDK (8.6.0):

    • GoogleAppMeasurement (< 9.0, >= 7.0)

    • GoogleUserMessagingPlatform (>= 1.1)

  • GoogleAppMeasurement (8.2.0):

    • GoogleAppMeasurement/AdIdSupport (= 8.2.0)

    • GoogleUtilities/AppDelegateSwizzler (~> 7.4)

    • GoogleUtilities/MethodSwizzler (~> 7.4)

    • GoogleUtilities/Network (~> 7.4)

    • "GoogleUtilities/NSData+zlib (~> 7.4)"

    • nanopb (~> 2.30908.0)

  • GoogleAppMeasurement/AdIdSupport (8.2.0):

    • GoogleUtilities/AppDelegateSwizzler (~> 7.4)

    • GoogleUtilities/MethodSwizzler (~> 7.4)

    • GoogleUtilities/Network (~> 7.4)

    • "GoogleUtilities/NSData+zlib (~> 7.4)"

    • nanopb (~> 2.30908.0)

  • GoogleUserMessagingPlatform (2.0.0)
  • GoogleUtilities/AppDelegateSwizzler (7.4.1):

    • GoogleUtilities/Environment

    • GoogleUtilities/Logger

    • GoogleUtilities/Network

  • GoogleUtilities/Environment (7.4.1):

    • PromisesObjC (~> 1.2)

  • GoogleUtilities/Logger (7.4.1):

    • GoogleUtilities/Environment

  • GoogleUtilities/MethodSwizzler (7.4.1):

    • GoogleUtilities/Logger

  • GoogleUtilities/Network (7.4.1):

    • GoogleUtilities/Logger

    • "GoogleUtilities/NSData+zlib"

    • GoogleUtilities/Reachability

  • "GoogleUtilities/NSData+zlib (7.4.1)"
  • GoogleUtilities/Reachability (7.4.1):

    • GoogleUtilities/Logger

  • nanopb (2.30908.0):

    • nanopb/decode (= 2.30908.0)

    • nanopb/encode (= 2.30908.0)

  • nanopb/decode (2.30908.0)
  • nanopb/encode (2.30908.0)
  • PromisesObjC (1.2.12)

DEPENDENCIES:

  • Google-Mobile-Ads-SDK (~> 8.2)

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- Google-Mobile-Ads-SDK
- GoogleAppMeasurement
- GoogleUserMessagingPlatform
- GoogleUtilities
- nanopb
- PromisesObjC

SPEC CHECKSUMS:
Google-Mobile-Ads-SDK: 0d6e2e065c4efe9836bca3fbd6ff9ef0bca073c2
GoogleAppMeasurement: b52eafc9dff542d580700e708216568bd2fbf168
GoogleUserMessagingPlatform: ab890ce5f6620f293a21b6bdd82e416a2c73aeca
GoogleUtilities: f8a43108b38a68eebe8b3540e1f4f2d28843ce20
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97

PODFILE CHECKSUM: 11736dcdc57edbf62ff27c0fe4eee5ce9e8ea055

COCOAPODS: 1.10.1

Still broken on Admob Unity Plugin v6.0.1. Will you fix it or?

I deleted everything under Plugins/iOS, then updated admob and it works now. I got another error, but it was easy to fix with google

I deleted everything under Plugins/iOS, then updated admob and it works now. I got another error, but it was easy to fix with google

Is that "another error" about 'GADUAdNetworkExtras.h' file not found? Ref:
https://github.com/googleads/googleads-mobile-unity/issues/1617
https://github.com/googleads/googleads-mobile-unity/issues/1552

@p0w1nd Nope, it was different. I don't remember the content, but I was albe to fix it in 5 minutes with google :)

I also have the problem
Plugins/iOS/UnityAdsShowListener.h:8:45: No type or protocol named 'UnityAdsShowDelegate'
Plugins/iOS/UnityAdsUnityWrapper.m:79:15: No known class method for selector 'show:placementId:showDelegate:'

It could be that I updated from verified 3.6 to 3.7.1 , but later when I removed both and reinstall 3.6, it told me that it cannot find ibraries/com.unity.ads/Plugins/iOS/UnityAdsShowListener.mm in the target.
So frustrated, I really want to go without unityads, the website asked me to update to 3.7.x where it cannot be complied or with empty reference.

Please check if this solves your issue: https://github.com/googleads/googleads-mobile-unity/issues/1569#issuecomment-874685709

I fix it by removing the ads SDK from the project totally and import it again

i have the same 10 errors , any idea how to fix this!!

downolad the lastest admob unity plugin 6.1.1v https://github.com/googleads/googleads-mobile-unity/releases/tag/v6.1.1
and follow those tips for iOS https://www.youtube.com/watch?v=e-q_CPfu0M0

any solution for this i am stuck with this FROM WEEKS!!!!!

Was this page helpful?
0 / 5 - 0 ratings