6

I am building dynamic framework in which i am importing GoogleMobileAds framework (i am not linking it as binary)

I am simply importing it in the class code while keeping the framework on the project path without linking it in the "Link binary" in the build phases

import GoogleMobileAds

I am getting this error when trying to build the project:

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GADInterstitial", referenced from:
  static VeediSDK_admob.VeediUtils.loadNewAdd (VeediSDK_admob.VeediUtils.Type)() -> __ObjC.GADInterstitial in           
 VeediUtils.o
 "_OBJC_CLASS_$_GADRequest", referenced from:
  static VeediSDK_admob.VeediUtils.loadNewAdd (VeediSDK_admob.VeediUtils.Type)() -> __ObjC.GADInterstitial in VeediUtils.o
ld: symbol(s) not found for architecture arm64

Since i am building framework i don't want to link the GoogleMobileAds directly to the framework.

I made sure i am linking all the system frameworks required by GoogleMobileAds and confident that this is not the issue

Any ideas how to solve this?

Lukesivi
  • 2,206
  • 4
  • 25
  • 43
Michael A
  • 5,770
  • 16
  • 75
  • 127

4 Answers4

3

i had same issue
in my case i removed pod and import adMob FrameWork manually from
https://firebase.google.com/docs/admob/ios/download
and just drag "GoogleMobileAds.framework" into my project,
clean and run

Sultan Ali
  • 2,497
  • 28
  • 25
0

I had the same issue. For me helped removing package External Dependency Manager from

Assets/ExternalDependencyManager

Ole Pannier
  • 3,208
  • 9
  • 22
  • 33
0

as Sultan Ali mentioned, I removed Google ads from my pods, then I downloaded the Framework and added the folder to frameworks on the left side of xcode, but still didn't work, so I went to Targets->general->frameworks and I added GogleMobileAds.xcframework

Nat Serrano
  • 472
  • 1
  • 4
  • 17
0

Just add these two values in Build Settings ->Other Linker Flags $(inherited) -ObjC see this