SDKBOX review plugin not working with 3.9 JS version

I tried to integrate review plugin in my game built with 3.9 js version. I got these errors:
E/AndroidRuntime: FATAL EXCEPTION: main
E/AndroidRuntime: Process: com.js.callbreak, PID: 12137
E/AndroidRuntime: java.lang.NoClassDefFoundError: com.sdkbox.plugin.review.R$string
E/AndroidRuntime: at org.codechimp.apprater.AppRater.getPromptTitle(AppRater.java:427)
E/AndroidRuntime: at org.codechimp.apprater.AppRater.showRateAlertDialog(AppRater.java:298)
E/AndroidRuntime: at org.codechimp.apprater.AppRater.tryShowDialog(AppRater.java:223)
E/AndroidRuntime: at com.sdkbox.plugin.PluginReview$1.run(PluginReview.java:55)
E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:733)
E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime: at android.os.Looper.loop(Looper.java:146)
E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5598)
E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)

@pabitrapadhy I just saw your sdkbox support mail, can you please help me out on above issue please?

Hi @jeevs

May we know which version of Cocos and SDKBOX are you using ?
and also if you are not in the current version of sdkbox, could you please update and check whether the issue exists … !!

You can update sdkbox using this command - sdkbox update

Best,
Pabitra

Sorry for replying late. I skipped using sdkbox last time, now again I’m trying to use sdkbox for Admob+Review plugin.
I’m using Cocos2d JS 3.9. I have imported Admob and Review plugin into my project. When I tried to run in Xcode 7.2, I got these errors:

Ld /Users/Jeevan/Library/Developer/Xcode/DerivedData/xxx-app_name-xxx-fyjlujqgglffltfjwoujozdadkyo/Build/Products/Debug-iphonesimulator/xxx-app_name-xxx-mobile.app/xxx-app_name-xxx-mobile normal x86_64
cd /work/Cocos2dx/xxx-app_name-xxx/frameworks/runtime-src/proj.ios_mac
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode 7.2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode 7.2.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode\ 7.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode\ 7.2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -L/Users/Jeevan/Library/Developer/Xcode/DerivedData/xxx-app_name-xxx-fyjlujqgglffltfjwoujozdadkyo/Build/Products/Debug-iphonesimulator -Lsdkbox.framework -LPluginAdMob.framework -LGoogleMobileAds.framework -LPluginReview.framework -F/Users/Jeevan/Library/Developer/Xcode/DerivedData/xxx-app_name-xxx-fyjlujqgglffltfjwoujozdadkyo/Build/Products/Debug-iphonesimulator -F/work/Cocos2dx/xxx-app_name-xxx/frameworks/runtime-src/proj.ios_mac -filelist /Users/Jeevan/Library/Developer/Xcode/DerivedData/xxx-app_name-xxx-fyjlujqgglffltfjwoujozdadkyo/Build/Intermediates/xxx-app_name-xxx.build/Debug-iphonesimulator/xxx-app_name-xxx-mobile.build/Objects-normal/x86_64/xxx-app_name-xxx-mobile.LinkFileList -mios-simulator-version-min=7.0 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -stdlib=libc++ -fobjc-link-runtime -liconv -framework Security -framework MediaPlayer /Users/Jeevan/Library/Developer/Xcode/DerivedData/xxx-app_name-xxx-fyjlujqgglffltfjwoujozdadkyo/Build/Products/Debug-iphonesimulator/libjscocos2d\ iOS.a /Users/Jeevan/Library/Developer/Xcode/DerivedData/xxx-app_name-xxx-fyjlujqgglffltfjwoujozdadkyo/Build/Products/Debug-iphonesimulator/libcocos2d\ iOS.a -framework CoreMotion -lsqlite3 -lz -framework QuartzCore -framework OpenGLES -framework OpenAL -framework AudioToolbox -framework AVFoundation -framework UIKit -framework Foundation -framework CoreGraphics -framework sdkbox -framework PluginAdMob -framework GoogleMobileAds -framework AdSupport -framework CoreMedia -framework CoreTelephony -framework EventKit -framework EventKitUI -framework MessageUI -framework StoreKit -framework SystemConfiguration -framework PluginReview -Xlinker -dependency_info -Xlinker /Users/Jeevan/Library/Developer/Xcode/DerivedData/xxx-app_name-xxx-fyjlujqgglffltfjwoujozdadkyo/Build/Intermediates/xxx-app_name-xxx.build/Debug-iphonesimulator/xxx-app_name-xxx-mobile.build/Objects-normal/x86_64/xxx-app_name-xxx-mobile_dependency_info.dat -o /Users/Jeevan/Library/Developer/Xcode/DerivedData/xxx-app_name-xxx-fyjlujqgglffltfjwoujozdadkyo/Build/Products/Debug-iphonesimulator/xxx-app_name-xxx-mobile.app/xxx-app_name-xxx-mobile

Undefined symbols for architecture x86_64:
“_GCControllerDidConnectNotification”, referenced from:
-[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2d iOS.a(CCController-iOS.o)
“_GCControllerDidDisconnectNotification”, referenced from:
-[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2d iOS.a(CCController-iOS.o)
“OBJC_CLASS$_GCController”, referenced from:
objc-class-ref in libcocos2d iOS.a(CCController-iOS.o)
(maybe you meant: OBJC_CLASS$_GCControllerConnectionEventHandler)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Hey @jeevs

It seems that some frameworks are missing in your project.

Solution: 
Just add following frameworks BuildSettings -> Build Phase -> Link Binary with libraries

MediaPlayer.framework
GameController.framework 

Please try to build after this.
If still didn’t solve your issue, then you might need to add -ObjC linker flag in Other Linker Flags of Xcode project.

Best,
Pabitra

Hi @pabitrapadhy
Thanks, it worked like a charm :smile: . One more question, how can I set multiple testdevices for admob?
sdkbox.PluginAdMob.setTestDevices(“xxxxxx”) this allows only one id.

We will address the admob testing device issue in our next release, we’ll automatically setTestDevice for you, if you set a the test flag in sdkbox_config.json

@nite

I guess this didn’t came up with the latest release.
any holdup for it. !!

I was updated about the pull already, but not with plugin as of now.

@jeevs
We will update you once it comes up.
thanks

Best,
Pabitra

Thanks for all the support guys!
Admob plugin has banner size issues too. Other few more devs has also reported about it already in the forum.
Any ETA for Admob update :wink: .

We improved admob banner possitioning in 2.1.3 let me know if you encounter any problem.
There is also a new config flag that will automatically add a device as a test device.

I updated sdkbox, now it’s showing test ads only, sdkbox_config.json is unchanged, how to use the test flag? No instruction found in the docs about test flag.

try "test": false we’ll add documents for the test flag.

Thanks for putting test flag in json. It’s really easy but can we still set multiple test device ids ? So that always test ads will appear in our own test devices even the app is final release version. We keep released version installed in our devices no? This gonna be a life saver from accidental touch. What do you think?

This use case can be handled by make a “test”: true version and run it on your testing devices, no matter how many devices.
We do not see the advantage of introducing test device id in Jason config, let us know if you think differently.
Thanks, Ryan

Yes, I know this use case is handled by “test”: true. I’m sorry if I wasn’t able to make you clear. But my point is if there is some way out to put desired test devices either in json or in code, let’s show test ads only in the given test devices even “test”:false is set.
The main point is: I have to set “test”:false in release version of the app and I install the release version in my devices. When I run my games in my own devices it will always show test ads. So, no risk of accidental tap on the ads. If I accidentally tapped on my own ads then Admob account can be deactivated and that’s the huge risk. I have kids, I work at home, so obviously more chances of accidental taps in my case :D. I think I have made my point clear here.

You can use the sdkbox::PluginAdMob::setTestDevices() function to opt-out specific device

1 Like

But how can I set multiple testdevices for admob?
sdkbox.PluginAdMob.setTestDevices() this allows only one id no?

It takes multiple devices, pls try and let us know if it only talk one ID.

But how do I set multiple IDs? Can I pass multiple IDs separated with comma (,) ? Or any other separator char?

You can set multiple ids by invoke this function multiple times.