[SOLVED] SDKBOX Play causing Xcode project Build to fail

Hi,

I have a project that was working just fine when building it in my Xcode (using SDKBOX AdMob, Flurry Analytics and Social Share). The project also built successfully for Android. Then I added SDKBOX Play and it built successfully for Android but on Xcode is causing the following errors. I am trying to setup Game Center and Leaderboards (no achievements).

Any help would be greatly appreciated.

And:

Can you do a search for the missing function? we provided source code for these functions and included in your project, so maybe somehow they failed to add to xcode project.

I’m comparing my files with the files in: GitHub - sdkbox/sdkbox-sample-sdkboxplay: Sample for SDKBOX play plugin

Some differences I found:

  • Some of my files have variables declared as double and the sample project has the same variables declared as int
  • In PluginSdkboxPlayJS.cpp line 121 and 139
    my project has:
    ok &= sdkbox::js_to_number(cx, argv[1], &arg1);
    the sample project has:
    ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1);
  • The sample project has:
    sdkbox-sample-sdkboxplay/js/frameworks/runtime-src/Classes/PluginSdkboxPlay.cpp and
    sdkbox-sample-sdkboxplay/js/frameworks/runtime-src/Classes/PluginSdkboxPlay.hpp my project does not have those files.

I added those 2 files into my project and rebuilt using Cocos Creator. Then I re-opened the iOS project in Xcode, did a Project Clean and plugged my iPhone to try to run my game on it to test Game Center Leaderboards (yes my provisioning profile and certificates all work fine).

The new error I am getting is from PluginSdkboxPlay.cpp

No member named ‘PluginSdkboxPlay’ in namespace ‘sdkbox’

Can you double check if there is PluginSdkboxPlay.h included in your project, also if you can PM your project source to me and @yinjimmy we can take a look.

SOLUTION:

Add PluginSdkboxPlayJS.cpp, PluginSdkboxPlayJSHelper.cpp, PluginSdkboxPlay.framework to Target Membership of Xcode .

Thanks to @yinjimmy