iOS Admob Mediation: all_load linker breaks app

301 views
Skip to first unread message

paul

unread,
Apr 30, 2012, 2:38:35 PM4/30/12
to google-adm...@googlegroups.com
Hi,

I'm developing an app for:
iOS
on Xcode 4.3.2, OSX 10.7.3
Testing with iPhone simulators 4.3+ and an iPad device.

I have Admob functioning perfectly, but I'd like to implement several other supported networks using Admob Mediation, which requires the linker flags '-ObjC -all_load' to be set. This causes duplicate symbol errors with every supported network library that I try, as well as duplicate symbol errors with all my other static libraries unrelated to admob mediation.

I've tried everything I could find on this seemingly common issue. The best solution seems to be to replace '-all_load' with '-force_load "path/to/offending/lib.a"' and add a force_load for each conflicting library. I've tried this and it doesn't seem to change anything. I still get the duplicate symbols errors.

For example, I can get Admob compiling with mediation so long as no other networks and libraries are integrated. If I then try to add, for example Mellenial, I get the following error, even with '-force_load "MMSDK/libMMSDK_4.5.5.a"' added to the linkers:

ld: duplicate symbol _OBJC_METACLASS_$_SBJsonParser in [path]/Objects-normal/armv7/SBJsonParser.o and MMSDK/libMMSDK_4.5.5.a(SBJsonParser.o) for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

For more info see my Stack Overflow question: http://stackoverflow.com/questions/10343075/ios-admob-network-mediation-duplicate-symbols-error-with-all-load-and-objc

Any ideas on how to get Admob Mediation working with other networks?

Thanks

Rajkumar Parameswaran

unread,
Apr 30, 2012, 5:20:35 PM4/30/12
to google-adm...@googlegroups.com
Hmm, I am trying to reproduce the issue and having a hard time. If you start with the AdMob example from here and add the Millennial SDK to that and try to run it (after adding your mediation ID and the necessary linker flags), are you seeing the issue?

di li

unread,
May 7, 2012, 12:33:44 AM5/7/12
to Google AdMob Ads Developers
i have the same problem and the example can not build

On 5月1日, 上午5时20分, Rajkumar Parameswaran <rajp...@google.com> wrote:
> Hmm, I am trying to reproduce the issue and having a hard time. If you
> start with the AdMob example from
> here<http://google-mobile-dev.googlecode.com/files/BannerExample_iOS_2.2.zip>
> >http://stackoverflow.com/questions/10343075/ios-admob-network-mediati...

Rajkumar Parameswaran

unread,
May 7, 2012, 2:34:14 PM5/7/12
to google-adm...@googlegroups.com
I believe Paul got his project to work by modifying some of the files under the "Compile Sources" section of his project. Can you tell me exactly what errors you are seeing when trying to build the example? 

I think the linker flags should already be set for the project so as long as you are linking to the newest AdMob iOS SDK, it should work properly.

Raj Parameswaran

unread,
May 7, 2012, 3:00:33 PM5/7/12
to Google AdMob Ads Developers
Whoops, I take that back, you have to explicitly put the linker flags
into the project I believe. Sorry about that.

Jeff Trespalacios

unread,
May 30, 2012, 12:08:34 PM5/30/12
to google-adm...@googlegroups.com
I am having this same issue using AdFonic and InMobi with Google Ad Mob Mediation.  I have both the -ObjC and -load_all flags set and received the error.  I've also tried using -force_load and still have the same issue.  Do you have any recommendations on how to get around this problem?

Eric Leichtenschlag

unread,
May 31, 2012, 8:28:49 PM5/31/12
to google-adm...@googlegroups.com
According to https://groups.google.com/forum/?fromgroups#!topic/google-admob-ads-sdk/WI2ZfJmpdGQ, AdFonic has fixed this issue in their latest build.
Reply all
Reply to author
Forward
0 new messages