1
votes

I've added the MoPub iOS SDK to my rather simple project to allow advertisements from more than just iAd in the app.

When I run the app on the simulator all is fine - but when I attempt to send/copy the app to my iPhone I get 18 'Apple Mach-O Linker Error' error messages saying:

"_MillennialMediaAdObjectKey", referenced from:
  -[MPMillennialBannerCustomEvent adWasTapped:] in MPMillennialBannerCustomEvent.o
  -[MPMillennialBannerCustomEvent modalDidDismiss:] in MPMillennialBannerCustomEvent.o
"_MillennialMediaAdTypeKey", referenced from:
  -[MPMillennialInterstitialCustomEvent notificationIsRelevant:] in MPMillennialInterstitialCustomEvent.o
  -[MPMillennialInterstitialCustomEvent adWasTapped:] in MPMillennialInterstitialCustomEvent.o
"_OBJC_CLASS_$_MMAdView", referenced from:
  objc-class-ref in MPMillennialBannerCustomEvent.o
"_MillennialMediaAPIDKey", referenced from:
  -[MPMillennialInterstitialCustomEvent notificationIsRelevant:] in MPMillennialInterstitialCustomEvent.o
"_MillennialMediaAdModalDidDismiss", referenced from:
  -[MPMillennialInterstitialCustomEvent init] in MPMillennialInterstitialCustomEvent.o
  -[MPMillennialBannerCustomEvent init] in MPMillennialBannerCustomEvent.o
"_MillennialMediaAdModalWillAppear", referenced from:
  -[MPMillennialInterstitialCustomEvent init] in MPMillennialInterstitialCustomEvent.o
"_OBJC_CLASS_$_GADRequest", referenced from:
  objc-class-ref in MPGoogleAdMobInterstitialCustomEvent.o
  objc-class-ref in MPGoogleAdMobBannerCustomEvent.o
"_MillennialMediaAdWasTapped", referenced from:
  -[MPMillennialInterstitialCustomEvent init] in MPMillennialInterstitialCustomEvent.o
  -[MPMillennialBannerCustomEvent init] in MPMillennialBannerCustomEvent.o
"_OBJC_CLASS_$_GADInterstitial", referenced from:
  objc-class-ref in MPGoogleAdMobInterstitialCustomEvent.o
"_OBJC_CLASS_$_MMInterstitial", referenced from:
  objc-class-ref in MPMillennialInterstitialCustomEvent.o
"_OBJC_CLASS_$_GADBannerView", referenced from:
  objc-class-ref in MPGoogleAdMobBannerCustomEvent.o
"_MillennialMediaAdModalWillDismiss", referenced from:
  -[MPMillennialInterstitialCustomEvent init] in MPMillennialInterstitialCustomEvent.o
"_OBJC_CLASS_$_MMRequest", referenced from:
  objc-class-ref in MPMillennialInterstitialCustomEvent.o
  objc-class-ref in MPMillennialBannerCustomEvent.o
"_MillennialMediaAdTypeInterstitial", referenced from:
  -[MPMillennialInterstitialCustomEvent notificationIsRelevant:] in MPMillennialInterstitialCustomEvent.o
  -[MPMillennialInterstitialCustomEvent adWasTapped:] in MPMillennialInterstitialCustomEvent.o
"_MillennialMediaAdModalDidAppear", referenced from:
  -[MPMillennialInterstitialCustomEvent init] in MPMillennialInterstitialCustomEvent.o
"_kGADAdSizeBanner", referenced from:
  -[MPGoogleAdMobBannerCustomEvent frameForCustomEventInfo:] in MPGoogleAdMobBannerCustomEvent.o
"_CGSizeFromGADAdSize", referenced from:
  -[MPGoogleAdMobBannerCustomEvent frameForCustomEventInfo:] in MPGoogleAdMobBannerCustomEvent.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I followed the guide on the MoPub siteexactly & have triple checked I have all of the MoPub SDK frameworks flagged as '-fno-objc-arc' & all of my .m files are blank in the 'Build Phases' --> 'Compile Sources group'.

I have done a search on here & most of the responses say to check my personal .m's are listed in the compile sources group section which they all are so any ideas on this are greatly appreciated!!!

Thanks

2
You can't no-arc flag frameworks, only implementation files. What do you mean by ".m files are blank"? You will want to have them in compile sources or else they won't be compiled. My best guess is that you have at least one target that doesn't build for the arm64 target, check the build settings, specifically anything architecture related. - LearnCocos2D
I have no-arc'd the MoPub SDK implementation files - I used the wrong wording, sorry! also, by blank i mean I haven't entered Compiler flags for my own .m's, only the MoPub SDK ones. Also, i have checked the architectures & it is set to standard including 64bit, so arm64, armv7 & armv7s. The only thing I KNOW i have changed on the build settings tab/section is adding '-ObjC' to 'Other linker flags' again this is to do with the MoPub SDK. - user2820855
I have just noticed under targets I have 2 items, MyTestApp & MyTestAppTests which I guess was created by XCode (maybe I selected something I shouldn't have - still unsure about XCode 5!?) do I need to add the compile sources for the frameworks incl. in the MoPub SDK & compiler flags in here too like i did for MyTestApp? - user2820855
if you're not doing unit tests you can delete the MyTestAppTests target - LearnCocos2D
you can compile and run armv7s on your iphone 5s, exclude arm64 from required archs and run it. - Andrei Shender

2 Answers

1
votes

MoPub SDK doesn't currently support arm64 architecture.

0
votes

MoPub Full SDK do not support arm64 architecture as user2820885 said. change the architecture and works fine.

From $(ARCHS_STANDARD) to armv7