ReferenceError: sdkbox is not defined

Hi !
I have been unable to integrate the SDKBOX successfully. I am on windows and using Cocos Code IDE. I used the guide at http://docs.sdkbox.com/en/plugins/facebook/v3-js/ and followed all steps but I am unable to configure the SDKBOX into my project.As when I even try to initiate sdkbox using “sdkbox.PluginFacebook.init();” , I get ReferenceError: sdkbox is not defined. Any help will be greatly appreciated. Thanks

1 Like

Hello @wajahatali

Please check with the api calls from our sample.
https://github.com/sdkbox/sdkbox-facebook-sample

I guess you missed some inclusions.

Best,
Pabitra

Can you double check your AppDelegate.cpp make sure all the JS bindings are been registered there

	sc->addRegisterCallback(register_all_PluginChartboostJS);
	sc->addRegisterCallback(register_all_PluginChartboostJS_helper);

looks like that’s the issue for your integration.

Should those 2 lines be in between and if statement like this:

#ifdef SDKBOX_ENABLED
sc->addRegisterCallback(register_all_PluginChartboostJS);
sc->addRegisterCallback(register_all_PluginChartboostJS_helper);
#endif

Hello @efares

The conditional inclusions prevents you from unsupported platforms.
So, it’s better to have them.

Thanks for the reply @pabitrapadhy
Quick question: How do I know/Where do I check if SDKBOX is ENABLED or not?

That particular conditional inclusion checks whether SDKBOX is enabled for the currentl platform like iOS, Android, JS etc.

So, it prevents the user to expect that SDKBOX would work in Tizen devices, as it doesn’t support TIzen, so that’s for OS check, it should work fine for you.

Best,
Pabitra

1 Like

I’m facing the same issue… Any luck??

SDKBox only support iOS and Android platform, not for WIN32, macOS, Web.