Unity - Admob mediation on iOS with Unity Ads

863 views
Skip to first unread message

Mooshoo Labs

unread,
May 17, 2017, 2:21:09 PM5/17/17
to Google Mobile Ads SDK Developers
Hi,

I am using Unity 5.4.2f2 to build a game on iOS.

I have integrated the Google Admob Unity plugin and it is working fine. I can build the game and play it and see admob ads being displayed.

I have also integrated Chartboost mediation and it is also working fine.

I have followed the instructions to add mediation for Unity Ads. I am using CocoaPods to integrate it.

Both the UnityAds.framework and UnityAdapter.framework have been added correctly in the Build Phase > Link Binary With Libraries in Xcode.

However when I am compiling it is failing during the linking step with the error message:

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_UADSMediationMetaData", referenced from:
      objc-class-ref in UnityAdapter(GADMAdapterUnitySingleton.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Do you guys have any clues on what I did wrong?

Thanks,
T. 

Deepika Uragayala- MobileAds SDK team

unread,
May 17, 2017, 4:39:56 PM5/17/17
to Google Mobile Ads SDK Developers
Hi there,

I'm sure that you might either be using an older version of framework/adapter or that you don't have -ObjC and $(inherited) in your OTHER_LDFLAGS under Build Settings. In any of those cases, can you try with pod 'GoogleMobileAdsMediationUnity' via CocoaPods?  You can also follow our guidelines page for more information.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
Message has been deleted
Message has been deleted

Mooshoo Labs

unread,
May 18, 2017, 7:57:31 AM5/18/17
to Google Mobile Ads SDK Developers
Hi Deepika,

Thanks for getting back to me. I am already using pods as I have follows the instructions from the guidelines page.

I am using Xcode version 8.1 (8B62).

I have updated the Google Mobile Ads Unity Plugin to version 3.5.0.

My podfile looks like that: Podfile screenshot

My OTHER_LDFLAGS looks like that: OTHER_LDFLAGS screenshot

However I am still getting the same linking error:
Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_UADSMediationMetaData", referenced from:
      objc-class-ref in UnityAdapter(GADMAdapterUnitySingleton.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks,
T.

Deepika Uragayala- MobileAds SDK team

unread,
May 18, 2017, 3:30:07 PM5/18/17
to Google Mobile Ads SDK Developers
Hi there,

It looks like integrate_targets might be the issue here. Let's try this - see if you are able to manually copy the UnityAd's SDK and Adapter into the Xcode Project/Frameworks folder. And then add it to the Target and ensure that it's there in the Build Phases. Let us know if that works. If not, can you send us your sample app and we will have a look into it?

Regards,
Deepika Uragayala
Mobile Ads SDK Team


Mooshoo Labs

unread,
May 19, 2017, 8:16:16 AM5/19/17
to Google Mobile Ads SDK Developers
Hi Deepika,

I have tried manually dragging the frameworks and adding them to the target but I have the same linking error.

Here is my Xcode project: link to project.

Thanks,
T


On Wednesday, May 17, 2017 at 7:21:09 PM UTC+1, Mooshoo Labs wrote:

Deepika Uragayala- MobileAds SDK team

unread,
May 19, 2017, 2:47:17 PM5/19/17
to Google Mobile Ads SDK Developers
Hi,

Thanks for sharing the project. It looks like you have not enabled the CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES flag, which is needed to import non modular frameworks. I was able to load the project after enabling this. Also, make sure to use the latest UnityAd SDK and Adaptor. Here is a sample app that you can use.

Regards,
Deepika Uragayala
Mobile Ads SDK Team


Reply all
Reply to author
Forward
0 new messages