I've done everything EXACTLY as it is written in "Build instructions" here:
https://github.com/mopub/mopub-unity-ios-plugin
Import UnityPlugin's MoPubiOS.unitypackage into your Unity iOS Project
(Optional) Add UnityPlugin's Plugins/MoPub/testSupport/MoPubTestScene to the Unity build window [contains the MoPubGUIManager.cs example]
Use Unity Player to build your Unity iOS Project into an Xcode project
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
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
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?
Copyright Notice:Content Author:「AndrewK」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/15923731/unity-ios-mopub-installation-xcode-compilation-errors