I’m a newbie in MOE, i try to add ads admob in my game (use Libgdx). When i generate New Bindings every look OK. But when I use GADBannerView in code that have error
Binding class refers to class GADBannerView, but it can not be found. Fallback to indirect super class.
2017-05-11 11:23:35.360 Dragon[3443:90249] -[UIView initWithAdSize:]: unrecognized selector sent to instance 0x7af6e390
org.moe.natj.objc.ObjCException: -[UIView initWithAdSize:]: unrecognized selector sent to instance 0x7af6e390
at apple.uikit.c.UIKit.UIApplicationMain(Native Method)
at com.game.IOSMoeLauncher.main(IOSMoeLauncher.java:37)
I add flag -ObjC in Other Linker Flags to Debug and Release. But error still!
How do I can fix it, please? Why do we have any video in Youtube support that? When i fix it, i will upload video.
The moe-bindings project includes a sample app as well, you should be able to try it out there.
Also, please post your project (or a simplified test project that shows the problem), so we can better help you.
One thing I noticed from LibGDX is that since the iOS module isn’t the root level of the project, some things act strangely. One of them is the proguard.append.cfg gets generated out of place and doesn’t get recognized because of that.
In the build.gradle for your iOS module, you probably have something like
def proguard = file("proguard.append.cfg")
if (!proguard.exists()) {
proguard = new File("proguard.append.cfg")
proguard << "\n-keep class com.badlogic.** { *; }\n"
proguard << "-keep enum com.badlogic.** { *; }\n"
}
The problem is that new File("proguard.append.cfg") generates that file in the root project directory, which is NOT your MOE module. You’ll want to change that to something like new File("ios-moe/proguard.append.cfg") which tells it to put the file in your ios-moe module.
Then you can add proguard configurations to keep your bindings and other important classes. Hopefully that helps, took me a while to get that one sorted