Googleads-mobile-unity: Undefined symbols when building on Xcode with admob medation

Created on 22 Oct 2021  Â·  5Comments  Â·  Source: googleads/googleads-mobile-unity

[REQUIRED] Step 1: Describe your environment

  • Unity version: 2020.3.16f1
  • Google Mobile Ads Unity plugin version: GoogleMobileAds-v6.1.2
  • Platform: iOS
  • Platform OS version: N/A
  • Any specific devices issue occurs on: _____
  • Mediation ad networks used, and their versions: AppLovinUnityAdapter-5.1.1, FacebookUnityAdapter-3.5.0, UnityAdsUnityAdapter-2.7.2

[REQUIRED] Step 2: Describe the problem

I met an error when build project on Xcode:

Undefined symbols for architecture arm64:
"_kGADAdSizeBanner", referenced from:
-[GADMAdapterUnity supportedAdSizeFromRequestedSize:] in UnityAdapter(GADMAdapterUnity.o)
"_kGADAdSizeLeaderboard", referenced from:
-[GADMAdapterUnity supportedAdSizeFromRequestedSize:] in UnityAdapter(GADMAdapterUnity.o)
"_OBJC_CLASS_$_GADMobileAds", referenced from:
objc-class-ref in FacebookAdapter(GADMediationAdapterFacebook.o)
objc-class-ref in FacebookAdapter(GADMAdapterFacebook.o)
objc-class-ref in FacebookAdapter(GADFBUtils.o)
(maybe you meant: _OBJC_CLASS_$_GADMobileAdsBridge)
"_GADClosestValidSizeForAdSizes", referenced from:
+[GADMAdapterAppLovinUtils appLovinAdSizeFromRequestedSize:] in AppLovinAdapter(GADMAdapterAppLovinUtils.o)
-[GADFBBannerAd getBannerWithSize:] in FacebookAdapter(GADFBBannerAd.o)
-[GADMAdapterUnity supportedAdSizeFromRequestedSize:] in UnityAdapter(GADMAdapterUnity.o)
"_IsGADAdSizeValid", referenced from:
-[GADMAdapterUnity getBannerWithSize:] in UnityAdapter(GADMAdapterUnity.o)
"_OBJC_CLASS_$_GADNativeAdImage", referenced from:
objc-class-ref in FacebookAdapter(GADFBNativeBannerAd.o)
objc-class-ref in FacebookAdapter(GADFBUnifiedNativeAd.o)
objc-class-ref in FacebookAdapter(GADFBNativeRenderer.o)
objc-class-ref in FacebookAdapter(GADFBNativeAdBase.o)
"_GADUnifiedNativeIconAsset", referenced from:
-[GADFBNativeBannerAd didRenderInView:clickableAssetViews:nonclickableAssetViews:viewController:] in FacebookAdapter(GADFBNativeBannerAd.o)
-[GADFBUnifiedNativeAd didRenderInView:clickableAssetViews:nonclickableAssetViews:viewController:] in FacebookAdapter(GADFBUnifiedNativeAd.o)
-[GADFBNativeRenderer didRenderInView:clickableAssetViews:nonclickableAssetViews:viewController:] in FacebookAdapter(GADFBNativeRenderer.o)
"_OBJC_CLASS_$_GADAdReward", referenced from:
objc-class-ref in AppLovinAdapter(GADMAppLovinRewardedDelegate.o)
objc-class-ref in FacebookAdapter(GADFBRewardedRenderer.o)
objc-class-ref in UnityAdapter(GADMAdapterUnityRewardedAd.o)
"_OBJC_CLASS_$_GADMediatedUnifiedNativeAdNotificationSource", referenced from:
objc-class-ref in FacebookAdapter(GADFBNativeBannerAd.o)
objc-class-ref in FacebookAdapter(GADFBUnifiedNativeAd.o)
"_GADAdSizeFromCGSize", referenced from:
+[GADMAdapterAppLovinUtils appLovinAdSizeFromRequestedSize:] in AppLovinAdapter(GADMAdapterAppLovinUtils.o)
-[GADFBBannerAd getBannerWithSize:] in FacebookAdapter(GADFBBannerAd.o)
"_NSValueFromGADAdSize", referenced from:
+[GADMAdapterAppLovinUtils appLovinAdSizeFromRequestedSize:] in AppLovinAdapter(GADMAdapterAppLovinUtils.o)
-[GADFBBannerAd getBannerWithSize:] in FacebookAdapter(GADFBBannerAd.o)
-[GADMAdapterUnity supportedAdSizeFromRequestedSize:] in UnityAdapter(GADMAdapterUnity.o)
"_CGSizeFromGADAdSize", referenced from:
+[GADMAdapterAppLovinUtils appLovinAdSizeFromRequestedSize:] in AppLovinAdapter(GADMAdapterAppLovinUtils.o)
___41-[GADMAdapterAppLovin getBannerWithSize:]_block_invoke in AppLovinAdapter(GADMAdapterAppLovin.o)
-[GADFBBannerAd getBannerWithSize:] in FacebookAdapter(GADFBBannerAd.o)
"_NSStringFromGADAdSize", referenced from:
+[GADMAdapterAppLovinUtils appLovinAdSizeFromRequestedSize:] in AppLovinAdapter(GADMAdapterAppLovinUtils.o)
___41-[GADMAdapterAppLovin getBannerWithSize:]_block_invoke in AppLovinAdapter(GADMAdapterAppLovin.o)
-[GADFBBannerAd getBannerWithSize:] in FacebookAdapter(GADFBBannerAd.o)
-[GADMAdapterUnity getBannerWithSize:] in UnityAdapter(GADMAdapterUnity.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

All 5 comments

@JameNguyen1994

Can you try running pod install using the terminal on the iOS project folder, and running the generated workspace file?

I have the same problem.
Unity build > pod install > .xcworkspace open > build > error

I changed GoogleMobileAds-v6.0.2 and other versions of other mediation packages .
but, I had the same errors.

I changed GoogleMobileAds-v.5.4.0 and other versions of other mediation packages .
It was OK. but Android platform build had other problems.

I hope to use GoogleMobileAds-v6.1.2.

@JameNguyen1994

Can you try running pod install using the terminal on the iOS project folder, and running the generated workspace file?

I have try the pod install on the iOS project and after a compare, it didn't changed my project, and still have the linking errors.

I have also uninstalled/reinstalled cocoapods without luck

My pod --version is 1.11.2. Is this good or important?

If you guys don't have the issue, it must be a local setup issue I guess?

This can be solved.

Step 1 Select Assets-> External Dependency Manager-> iOS Resolver-> Settings.
スクリーンショット 2021-09-03 21 25 39

Step 2 Enable Link frameworks statically.
スクリーンショット 2021-09-03 21 25 51

Is there a way to resolve this issue, Facing the same problem

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dylsg picture dylsg  Â·  7Comments

Seanm07 picture Seanm07  Â·  3Comments

psavi picture psavi  Â·  8Comments

alipjxhub picture alipjxhub  Â·  5Comments

bigmonmulgrew picture bigmonmulgrew  Â·  4Comments