Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unity/iOS - MoPub installation - Xcode compilation errors

I've done everything EXACTLY as it is written in "Build instructions" here: https://github.com/mopub/mopub-unity-ios-plugin

  1. Import UnityPlugin's MoPubiOS.unitypackage into your Unity iOS Project

  2. (Optional) Add UnityPlugin's Plugins/MoPub/testSupport/MoPubTestScene to the Unity build window [contains the MoPubGUIManager.cs example]

  3. Use Unity Player to build your Unity iOS Project into an Xcode project

  4. Copy the following source folders and files to the Classes/ folder of your Xcode project a. The complete contents of the MoPubSdk's MoPubSDK/ directory b. MoPubSdk's TouchJSON/ directory (including the parent directory) c. The MoPubBinding.m, MoPubManager.h, and MoPubManager.mm files from UnityPlugin

  5. Make modifications to the included frameworks in Xcode's Build Phases a. Add the StoreKit.framework b. Add the AdSupport.framework and set it to Optional

  6. Build and run your Xcode project

and, when I am trying to build the Xcode project I get 9 linker errors:

Undefined symbols for architecture armv7: "_moPubShowInterstitialAd", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_moPubRequestInterstitialAd", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_moPubShowBanner", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_moPubReportApplicationOpen", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_moPubRefreshAd", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_moPubEnableLocationSupport", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_moPubDestroyBanner", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_moPubCreateBanner", referenced from: RegisterMonoModules() in RegisterMonoModules.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

but I've copied files int Xcode classes folder (not Xcode project group "Classes") - as it is in point 4 exactly written

I tried copying into Xcode project "Classes" group as well (with option "copy if needed"). But then I have 1 error:

Lexical or preprocessor issue /Users/xxx/Desktop/UnityProjects/Xcode/Classes/MPAdView.h:11:9: 'MPGlobal.h' file not found But I have that file in Classes/Internal/Common Xcode project group as well as in the Classes Classes/Internal/Common Xcode project folder

Could someone help me with that please?

like image 675
AndrewK Avatar asked Dec 21 '25 17:12

AndrewK


1 Answers

I got it working one time by adding CoreTelephony.framework

Try adding it.

If you get:

MOPUB: Banner view failed. Error: Error Domain=com.mopub.iossdk Code=0 "The operation couldn’t be completed. (com.mopub.iossdk error 0.)

Then welcome to my club.. I haven't figured how to solve it yet.

like image 102
Ahmad Al Haddad Avatar answered Dec 24 '25 09:12

Ahmad Al Haddad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!