googleads-mobile-unity icon indicating copy to clipboard operation
googleads-mobile-unity copied to clipboard

UnityAds.h file not found in Unity Cloud Build iOS build - xcode build failed

Open rbyjoswald opened this issue 2 years ago • 1 comments

[REQUIRED] Step 1: Describe your environment

  • Unity version: 2020.3.32
  • Google Mobile Ads Unity plugin version: 7.1.0
  • Platform: iOS
  • Platform OS version: iOS13+
  • Any specific devices issue occurs on: UCB build error
  • Mediation ad networks used, and their versions: iosPod name="GoogleMobileAdsMediationUnity" version="4.2.1.0"
  • XCodeVersion: 13.2.1 (set to use latest in UCB).
  • External Dependency manager: 1.2.172.

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

Using the setup above I try to build an iOS app using Unity Cloud Build but I keep getting the build error:

/BUILD_PATH/projectpath/projectname/temp20220804-5893-1jmglme/Libraries/Plugins/iOS/GADUMUnityAdsInterface.m:15:9: fatal error: 'UnityAds/UnityAds.h' file not found

Thus the build fails in the xcode build phase.

I do not use the UnityAds SDK, but instead I get that dependency via the unity ads for gma mediation adapter. This only happens after I upgrade from Google Mobile Ads version 6.0.2 to the version mentioned above. External Dependency manager is at version 1.2.172.

XCodeVersion is 13.2.1 (set to use latest in UCB).

rbyjoswald avatar Aug 04 '22 13:08 rbyjoswald

UnityAds is part of the unity ads package. I reason that pod is failing to be included in the build. Can you try verify the sources are being downloaded by the unity cloud platform?

NVentimiglia avatar Aug 08 '22 21:08 NVentimiglia

That because the old Advertisement package is no longer support by Unity for iOS > 14

Just open Windows->Packages Manager->Remove the "Advertisement" package

Then install the new Advertisement package following this tutorial: https://docs.unity.com/ads/en/manual/InstallingTheiOS14SupportPackage

TheBlackHacker avatar Feb 10 '23 10:02 TheBlackHacker

That because the old Advertisement package is no longer support by Unity for iOS > 14

Just open Windows->Packages Manager->Remove the "Advertisement" package

Then install the new Advertisement package following this tutorial: https://docs.unity.com/ads/en/manual/InstallingTheiOS14SupportPackage

My night was a nightmare until I found your comment. Thank you so much really you're amazing thank you.

danlespect avatar Jul 25 '23 01:07 danlespect