i setDelegate(new GADInterstitialDelegate(){
@Override
public void interstitialDidDismissScreen(GADInterstitial ad) {
…
}
})
but delegate didn’t called.
i setDelegate(new GADInterstitialDelegate(){
@Override
public void interstitialDidDismissScreen(GADInterstitial ad) {
…
}
})
but delegate didn’t called.
i try native ios app. delegate works fine.
but in my moe project it’s not work.
need help
interstitial = GADInterstitial.alloc().initWithAdUnitID(“id is okay”);
interstitial.setDelegate(new GADInterstitialDelegate(){
@Override
public void interstitialDidDismissScreen(GADInterstitial ad) {
createNewGADInterstitial();
requestNewInterstitial();
if ( closeCall != null ) closeCall.call();
}
});
When a “delegate is not called” type of problem arises, it is important to check the output of retrolambda under the build/moe/main/retro/output
folder with a bytecode decompiler.
The reason is, that we use our custom version of Retrolambda which also processes Nat/J annotations, e.g. applies them to classes that implement Objective-C protocols.
You should confirm, that the anonymous class in question has the necessary @Selector
annotation added on the interstitialDidDismissScreen
method. If it is missing, please let us know, and as a workaround, you can add it manually.
If the annotation is there, but the delegate is still not called, we will have to look further for the cause.
Best Regards,
Gergely
i used java decompiler.
package com.moe.bindings.googlemobileads.protocol;
import org.moe.natj.general.ann.Generated;
import org.moe.natj.general.ann.Library;
import org.moe.natj.general.ann.Runtime;
import org.moe.natj.objc.ObjCRuntime;
import org.moe.natj.objc.ann.ObjCProtocolName;
@Library(“GoogleMobileAds”)
@Runtime(ObjCRuntime.class)
@ObjCProtocolName(“GADInterstitialDelegate”)
@Generated
public abstract interface GADInterstitialDelegate
{
}
Retrolambda 2.0.2-SNAPSHOT
Bytecode version: 51 (Java 7)
how can i change the Retrolambda 2.0.2-SNAPSHOT jdk version
please help me~~~~~~~~~~~~~~~
Hi!
Retrolambda did not add the @Seletor annotation to delegate methods, please add the missing annotations to the method like this:
interstitial.setDelegate(new InteressialDelegate() {
@Override
@Selector("interstitialDidDismissScreen:")
public void interstitialDidDismissScreen(GADInterstitial ad) {
}
@Override
@Selector("interstitialDidReceiveAd:")
public void interstitialDidReceiveAd(GADInterstitial ad) {
}
});
and you need to add the class to proguard.append.cfg as well.
Sample project:
https://drive.google.com/file/d/0BxaA-mVsTwv5RUJaaEhNY3QxUUk/view?usp=sharing
Best Regards,
Roland
thanks very much.
it’s works now.
What is the optimal for proguard.append.cfg or build.gradle for game i only add Admob. I see some build .ipa file have size large (as 120M) if no optimal and have size 55M or smaller if do this?
Every app needs a different proguard file, just like on Android. In MOE 1.x you need to do this manually (basically add the classes one by one when they are missing during execution). MOE 2.x will include a profiler that will output a generated proguard.cfg based on the classes loaded during app execution.
I see add proguardLevel ‘all’
“moe {
proguardLevel ‘all’
// …
}”
but when i add in build.gradle
moe {
xcode {
project ‘xcode/ios-moe.xcodeproj’
mainTarget ‘ios-moe’
testTarget ‘ios-moe-Test’
}
proguardLevel ‘all’
}, have error. Where add it in code?