Xcode "Undefined Symbol : _CGSizeFromGADAdSize" Error

After generating a unity build which works fine in the editor, I get this error in the title when I try to archive the build for App Store.

My application uses both Firebase and Google AdMob, which from my research from online forums these two packages causes the problem most likely. Unfortunately I've not found any solution from the Google side. Additionally I get an error message in unity after the build but the build is created no matter what.

I am not sure if this error happening because of a broken CocoaPods installation or some missing files/libraries in the build file. Any help would be appreciated. Thanks!

Unity Error :

iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.

After the failure, "pod repo update" was executed and succeeded. "pod install" was then attempted again, and still failed. This may be due to a broken CocoaPods installation. See: https://guides.cocoapods.org/using/troubleshooting.html for potential solutions.

pod install output:

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "GoogleAppMeasurement":
  In Podfile:
    Firebase/Core (= 9.6.0) was resolved to 9.6.0, which depends on
      FirebaseAnalytics (~> 9.6.0) was resolved to 9.6.0, which depends on
        FirebaseAnalytics/AdIdSupport (= 9.6.0) was resolved to 9.6.0, which depends on
          GoogleAppMeasurement (= 9.6.0)

    Google-Mobile-Ads-SDK (~> 8.8) was resolved to 8.13.0, which depends on
      GoogleAppMeasurement (< 9.0, >= 7.0)

Xcode Errors (The error list goes on more than this):

Undefined symbols for architecture arm64:

  "_CGSizeFromGADAdSize", referenced from:

      +[GADUPluginUtil safeAdSizeForAdSize:] in unity-plugin-library.a(GADUPluginUtil.o)

  "_FIRAuthErrorUserInfoUpdatedCredentialKey", referenced from:

      firebase::auth::SignInResultCallback(FIRAuthDataResult*, NSError*, firebase::SafeFutureHandle<firebase::auth::SignInResult>, firebase::auth::AuthData*) in libFirebaseCppAuth.a(auth_ios.mm.o)

  "_GADAdSizeEqualToSize", referenced from:

      +[GADUPluginUtil safeAdSizeForAdSize:] in unity-plugin-library.a(GADUPluginUtil.o)

  "_GADAdSizeFromCGSize", referenced from:

      +[GADUPluginUtil safeAdSizeForAdSize:] in unity-plugin-library.a(GADUPluginUtil.o)

      +[GADUPluginUtil adSizeForWidth:height:] in unity-plugin-library.a(GADUPluginUtil.o)

  "_GADAdSizeFullWidthPortraitWithHeight", referenced from:

      +[GADUPluginUtil adSizeForWidth:height:] in unity-plugin-library.a(GADUPluginUtil.o)

  "_GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth", referenced from:

      +[GADUPluginUtil adaptiveAdSizeForWidth:orientation:] in unity-plugin-library.a(GADUPluginUtil.o)

  "_GADErrorUserInfoKeyResponseInfo", referenced from:

      _GADUGetAdErrorResponseInfo in unity-plugin-library.a(GADUInterface.o)

  "_GADLandscapeAnchoredAdaptiveBannerAdSizeWithWidth", referenced from:

      +[GADUPluginUtil adaptiveAdSizeForWidth:orientation:] in unity-plugin-library.a(GADUPluginUtil.o)

  "_GADPortraitAnchoredAdaptiveBannerAdSizeWithWidth", referenced from:

      +[GADUPluginUtil adaptiveAdSizeForWidth:orientation:] in unity-plugin-library.a(GADUPluginUtil.o)

  "_OBJC_CLASS_$_FIRApp", referenced from:

      objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)

  "_OBJC_CLASS_$_FIRAuth", referenced from:

      objc-class-ref in libFirebaseCppAuth.a(auth_ios.mm.o)

  "_OBJC_CLASS_$_FIRComponentType", referenced from:

      objc-class-ref in libFirebaseCppFirestore.a(create_credentials_provider_ios.mm.o)

  "_OBJC_CLASS_$_FIRConfiguration", referenced from:

      objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)

  "_OBJC_CLASS_$_FIREmailAuthProvider", referenced from:

      objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)

  "_OBJC_CLASS_$_FIRFacebookAuthProvider", referenced from:

      objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)

  "_OBJC_CLASS_$_FIRGameCenterAuthProvider", referenced from:

      objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
Post not yet marked as solved Up vote post of Megasoft Down vote post of Megasoft
3.2k views

Replies

I am also getting this error. Have you found any solution?