googleads-mobile-unity: Build iOS failed: Undefined symbols for architecture arm64: "_GADURequestInterstitial"

  • Unity version: 2020.3.1 - 2020.3.6
  • Google Mobile Ads Unity plugin version: 6.0.0
  • Platform: iOS
  • Platform OS version: n/a
  • Any specific devices issue occurs on: n/a
  • Mediation ad networks used, and their versions:n/a
  • Xcode: 12.2

Steps to reproduce:

=> Create empty Unity project => Copy sample HelloWorld to Assets folder => Update Admob appId => Use original iOS Resolver Settings (enable use_frameworks! + enable Always add the main target) => Build to Xcode => Build using Xcode

Changing iOS Resolver Settings gives same result:

  • Disable use_frameworks!
  • Disable Always add the main target)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 18
  • Comments: 56 (3 by maintainers)

Most upvoted comments

@jungletree Thanks for explaining the problem.

We changed how we package the plugin for v6.0, and the issue lies in the dll build, not in the source code. So please import our source code instead of the unity package for now. We will release the fix soon.

I was able to get around this by commenting out line 7897 in Classes\Native\GoogleMobileAds.iOS.cpp in XCode:

reinterpret_cast<PInvokeFunc>(GADURequestInterstitial)(___interstitial0, ___request1);

This looks like the casting / native invocation of the GADURequestInterstitial function. Without this invocation, the compiler shouldn’t look for it.

Note that this code looks auto-generated, so it may not appear consistently on line 7897.

Also note that I don’t use interstitials in my code, so I’m not sure if this disables interstitials entirely or not. It may be more correct to implement the function as indicated by @jungletree above.

@onom88 It would probably be sufficient to reduce Assets/Plugins/iOS/Workaround.m to just this, with no headers needed at all:

// Workaround for https://github.com/googleads/googleads-mobile-unity/issues/1616

typedef const void *GADUTypeInterstitialRef;

typedef const void *GADUTypeRewardedAdRef;

typedef const void *GADUTypeRequestRef;

void GADURequestInterstitial(GADUTypeInterstitialRef interstitial, GADUTypeRequestRef request) { }

void GADURequestRewardedAd(GADUTypeRewardedAdRef rewardedAd, GADUTypeRequestRef request) { }

To anyone having issues with AdColony Mediation.

  • Make a backup of your GoogleMobileAdsSettings.asset file
  • Delete the GoogleMobileAds folder
  • Delete all google ads relate files in the Plugins/iOS and Plugins/Android folder
  • Install 6.0.1
  • Install all your Mediation network packages (AdColony included)
  • In the editor, go to Assets -> External Dependency Manager -> iOS Resolver -> Settings
  • Enable “Link frameworks statically”
  • Restore your backed up GoogleMobileAdsSettings.asset file
  • IMPORTANT go to releases and download the 6.0.1 source code
  • Grab the GADUAdNetworkExtras.h file from source/plugin/Assets/Plugins/iOS and paste it into Plugins/iOS
  • Build should work now

same problem

unity 2020.2.6f1 xcode 12.5

I updated to Xcode 14, and all errors were gone.

I had the same issue 6.0.1 with AdColony mediation (2.0.3) with “GADUAdNetworkExtras” file not found And I had removed AdColony from my project

Not the optimal solution since one less mediation network can affect ads income. But this was the only way I could build the game. Let’s hope it gets fixed soon

@blue7un Okay, I’m going to try adding GADU*-files from source/plugin/Assets/Plugins/iOS to Assets/Plugins/iOS/.