Hi folks,
I'm trying to integrate some Rewarded video ads using [GoogleAdMob unity plugin](https://github.com/googleads/googleads-mobile-unity). I managed to make the sample work for android by using [MAD Reward Mediation sample app](https://drive.google.com/open?id=0B_ZafC3Djh1RSzA3ZjY1R0s1M1k), [shared somewhere in a google group](https://groups.google.com/d/msg/google-admob-ads-sdk/l4NpdTdygYA/82P3QjbjAQAJ). Anyway, I was able to build for android and the reward videos are working for `AdColony`, `Chartboost` and `Unity Ads`, but I cannot build it for iOS.
I went on the [firebase admob/ios/mediation-networks page](https://firebase.google.com/docs/admob/ios/mediation-networks) and grabbed the ios Adapters for `AdColony`, `Chartboost` and `Unity Ads`, added them to `Plugins/iOS/` in my project. I though it was failing to build because of a missing linked `AdSupport.framework` so I made sure it was checked in Framework dependencies (it was). I manually added it to the Xcode build too, but it still fails.
Here's the error I get:
ld: warning: arm64 function not 4-byte aligned: ltmp0 from PATH_TO_IOS_BUILD/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
ld: warning: arm64 function not 4-byte aligned: _unwind_tester from PATH_TO_IOS_BUILD/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_AdColony", referenced from:
objc-class-ref in libAdapterSDKAdColony.a(GADMAdapterAdColony.o)
objc-class-ref in libAdapterSDKAdColony.a(GADMAdapterAdColonyInitializer.o)
"_OBJC_CLASS_$_Chartboost", referenced from:
objc-class-ref in libAdapterChartboostAds.a(GADMAdapterChartboostSingleton.o)
objc-class-ref in libAdapterChartboostAds.a(GADMAdapterChartboost.o)
"_ADC_SET_USER_GENDER", referenced from:
-[GADMAdapterAdColony addUserMetadata] in libAdapterSDKAdColony.a(GADMAdapterAdColony.o)
"_ADC_USER_MALE", referenced from:
-[GADMAdapterAdColony addUserMetadata] in libAdapterSDKAdColony.a(GADMAdapterAdColony.o)
"_ADC_SET_USER_LATITUDE", referenced from:
-[GADMAdapterAdColony addUserMetadata] in libAdapterSDKAdColony.a(GADMAdapterAdColony.o)
"_ADC_USER_FEMALE", referenced from:
-[GADMAdapterAdColony addUserMetadata] in libAdapterSDKAdColony.a(GADMAdapterAdColony.o)
"_ADC_SET_USER_AGE", referenced from:
-[GADMAdapterAdColony addUserMetadata] in libAdapterSDKAdColony.a(GADMAdapterAdColony.o)
"_CBLocationDefault", referenced from:
-[GADMAdapterChartboost setUp] in libAdapterChartboostAds.a(GADMAdapterChartboost.o)
-[GADMAdapterChartboost requestRewardBasedVideoAd] in libAdapterChartboostAds.a(GADMAdapterChartboost.o)
-[GADMAdapterChartboost getInterstitial] in libAdapterChartboostAds.a(GADMAdapterChartboost.o)
"_ADC_SET_USER_LONGITUDE", referenced from:
-[GADMAdapterAdColony addUserMetadata] in libAdapterSDKAdColony.a(GADMAdapterAdColony.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing first 200 warnings only
I'm building with Xcode `Version 8.1 (8B62)`. My build architectures are `armv7, arm64`. I do have `$(inherited)` flag in `Other Linker Flag` like in [this undefined-symbols-for-architecture-arm64 StackOverflow question](http://stackoverflow.com/questions/19213782/undefined-symbols-for-architecture-arm64).
This is what I have in my `Podfile`:
target 'Unity-iPhone' do
pod 'GooglePlayGames', '5.1'
pod 'Google-Mobile-Ads-SDK', '~> 7.8'
pod 'GoogleSignIn', '~> 2.2.0'
end
Without the added adapters, it does build, but it fails to display the ads. I'll try to isolate the problem in a separate project to see if it's related to something else than the ads adapters.
↧