Unable to use MoPub iOS SDK 4.0.0 via Pod if using Reachability library

ios

#1

Hi,

It’s impossible to use the latest mopub (4.0.0) vid pod if you have another library that uses reachability … which is a very common library, because in your own reachability file you have used the same constant name as used in reachability library. Can you please prefix your constants so that there are no issues?

“duplicate symbol kReachabilityChangedNotification”

Thanks!


#2

Actually, I may have jumped the gun here. I was having problems with MoPub and the Fabric plugin, so tried to force update to the latest version … but after downgrading again to a version that worked for me, 3.9.0 at a random guess, the plugin informed me the latest version was 3.13.0 … so maybe 4.0.0 isn’t even available yet!! If it is though, or it’s coming soon, I hope this information will be useful to you.

Thanks


#3

I’m having the same problem using mopub 4.0.0:

duplicate symbol _kReachabilityChangedNotification in:
    ..../libReachability.a(Reachability.o)
    ..../libmopub-ios-sdk.a(MPReachability.o)
ld: 1 duplicate symbol for architecture x86_64

Reachability is a very common dependency (with at least 100 references).
Please, add a prefix to your constants.


#4

fwiw I am not using a pod and hitting this error.

duplicate symbol _kReachabilityChangedNotification in:
    .../Debug-iphoneos/dam.build/Objects-normal/arm64/AReachability.o
    .../Debug-iphoneos/dam.build/Objects-normal/arm64/MPReachability.o
ld: 1 duplicate symbol for architecture arm64

Is it related?

Update Edit
Since I am using the open source SDK I was able to find this symbol (lose the preceding ‘_’ in the name.) The following fixed me and got me running. I’ve seen banner ads so far.

I changed “kReachabilityChangedNotification” to “kMPReachabilityChangedNotification” in MOPUBAVPlayer.m, MPReachability.h and MPReachability.m

I’ll put in a pull request as soon as I get our update out and know its working. If someone gets to it before me please let me know. (I don’t have the repo cloned atm)


#5

I just upgraded the Mopub SDK with pod to a project that contain Reachability too and got the duplicate symbol error. Can this be fixed soon ?

We are 23 days after the first report of this problem. Problems like this and warnings that appear in Xcode should be fixed before everything else.


#6

Thanks for bringing this to our attention, we are currently aware of the issue and have escalated this issue to our product and eng teams. If you have further inquiries, please reach out at support@mopub.com

Best,
Justin