SDKBox Failed To Import IAP & Facebook For Symbolic Link Cocos Folder

SDKBox Failed To Import IAP & Facebook For Symbolic Link Cocos Folder
0.0 0

#1

Hello,

I’m using cocos2dx 3.16 and sdkbox v1.0.1.32

I’ve tried importing sdkbox for iap with this command
sdkbox import iap -vv

and it fails
here are the log

  _______ ______  _     _ ______   _____  _     _
  |______ |     \ |____/  |_____] |     |  \___/ 
  ______| |_____/ |    \_ |_____] |_____| _/   \_
 Copyright (c) 2016-2017 SDKBOX Inc. v1.0.1.32
 test speed of hosts...
 - test host main: 492.37KB/s.
 - test host china: 35.53KB/s.
 choose the fastest server 'main', speed is 492.37KB/s.
 Namespace(alwaysupdate=0, apitoken=None, command='import', days=10, dryrun=None, forcecopy=0, forcedownload=0, info=None, installer='/Users/ernesernesto/.sdkbox/bin/sdkbox.pyc', jsonapi=0, legacy=None, local=0, manifest='manifest.json', mkey=None, mvalue=None, nohelp=0, nopatching=0, nopatchingcpp=0, noupdate=0, patcherrors=0, plugin='iap/', project='/Users/ernesernesto/Documents/project/sudomine/', remote=1, runin=None, server='download.sdkbox.com/installer/v1/', silenttime=None, symbol=None, verbose=2)

...
I omit the packages information
...

 cocos2d-x installation directory /Applications/Cocos/Cocos2d-x/cocos2d-x-3.16/
 cocos2d-x header directory /Applications/Cocos/Cocos2d-x/cocos2d-x-3.16/cocos/
 cocos2d-x installation version 3.16.0
 looking for cocos2d.h at /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos
 cocos2d-x project root /Users/ernesernesto/Documents/project/sudomine/
 fallback to cocos project search False
 cocos2d-x project type cpp
 loaded package manifest
 loaded cocos project
 iOS project dirs ['/Users/ernesernesto/Documents/project/sudomine/proj.ios_mac']
 loaded xcode project
 failed to load visual studio project
 loaded android project
 load android studio project
 supported projects cocos ios android android studio
 package base name iap
 skipping download of sdkbox-iap_v2.3.17.7.tar.gz, already exists as /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/
 setting plugin source to /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/
 SHA1 of downloaded package b8d0d7d79f265e0148b43e13fbc9efda95bad8c3
 adding to backup .sdkbox_packages.json.SeqHZudY.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/.sdkbox_packages.json
 adding to backup project.pbxproj.wuWPUkNJ.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/proj.ios_mac/sudomine.xcodeproj/project.pbxproj
 adding to backup Android.mk.XBRElNuQ.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/proj.android/jni/Android.mk
 adding to backup Application.mk.TjmN6yJY.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/proj.android/jni/Application.mk
 adding to backup AndroidManifest.xml.LMSdG32O.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/proj.android/AndroidManifest.xml
 adding to backup project.properties.NVTh8wij.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/proj.android/project.properties
 found sdkbox.package at /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/sdkbox.package
 defining constant SDKBOX_PLUGIN_NAME=>IAP
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.8.patch
 preprocessing patch Cocos2dxActivity.java.3.8.patch into Cocos2dxActivity.java.3.8.patch.2wKvdRFI.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 26  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 30  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 40  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 crlf: 0  lf: 47  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 6
 -  6 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 6
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = None
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.6.patch
 preprocessing patch Cocos2dxActivity.java.3.6.patch into Cocos2dxActivity.java.3.6.patch.w5giEB7k.sdkbox.temp
 crlf: 0  lf: 3  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 5  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 26  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 31  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 41  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 crlf: 0  lf: 48  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 6
 -  6 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 6
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = None
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.16.patch
 preprocessing patch Cocos2dxActivity.java.3.16.patch into Cocos2dxActivity.java.3.16.patch.qHEnPXOl.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 28  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 32  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 42  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 crlf: 0  lf: 49  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 6
 -  6 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 6
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = None
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.15.patch
 preprocessing patch Cocos2dxActivity.java.3.15.patch into Cocos2dxActivity.java.3.15.patch.213mKG0a.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 27  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 44  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 51  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 -  5 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 5
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = None
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.12.patch
 preprocessing patch Cocos2dxActivity.java.3.12.patch into Cocos2dxActivity.java.3.12.patch.3QyPphL2.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 27  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 42  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 49  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 -  5 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 5
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = None
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.11.patch
 preprocessing patch Cocos2dxActivity.java.3.11.patch into Cocos2dxActivity.java.3.11.patch.GQJbdKZj.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 26  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 42  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 49  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 -  5 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 5
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = None
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.0.patch
 preprocessing patch Cocos2dxActivity.java.3.0.patch into Cocos2dxActivity.java.3.0.patch.LNnKIXMl.sdkbox.temp
 crlf: 0  lf: 5  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 9  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 40  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 44  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 -  4 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 4
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = None
 adding to backup Cocos2dxActivity.java.vYM0RGAC.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java
 checking patch status of file AppDelegate.cpp against patch AppDelegate.cpp.cpp.3.0.patch
 preprocessing patch AppDelegate.cpp.cpp.3.0.patch into AppDelegate.cpp.cpp.3.0.patch.iG21qMrl.sdkbox.temp
 crlf: 0  lf: 5  cr: 0	 - file: AppDelegate.cpp hunk: 1
 crlf: 0  lf: 11  cr: 0	 - file: AppDelegate.cpp hunk: 2
 -  2 hunks for AppDelegate.cpp
 total files: 1  total hunks: 2
 has_patched: /Users/ernesernesto/Documents/project/sudomine/Classes/AppDelegate.cpp = False
 adding to backup AppDelegate.cpp.BMXq3i12.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/Classes/AppDelegate.cpp
 Saving to /Users/ernesernesto/Documents/project/sudomine/proj.android/project.properties from project.properties.NVTh8wij.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/Classes/AppDelegate.cpp from AppDelegate.cpp.BMXq3i12.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/proj.android/jni/Android.mk from Android.mk.XBRElNuQ.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/.sdkbox_packages.json from .sdkbox_packages.json.SeqHZudY.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/proj.ios_mac/sudomine.xcodeproj/project.pbxproj from project.pbxproj.wuWPUkNJ.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/proj.android/jni/Application.mk from Application.mk.TjmN6yJY.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java from Cocos2dxActivity.java.vYM0RGAC.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/proj.android/AndroidManifest.xml from AndroidManifest.xml.LMSdG32O.sdkbox.temp
 Creating backup archive /Users/ernesernesto/Documents/project/sudomine/backup-2018-02-20.zip
 Backup Completed.
 skipped xcode_add_compiler_flag -DSDKBOX_ENABLED
 skipped android_add_key_value 2 LOCAL_CPPFLAGS -DSDKBOX_ENABLED None
 skipped copy_file /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/ios/sdkbox.framework /Users/ernesernesto/Documents/project/sudomine/proj.ios_mac/sdkbox.framework
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/ios/PluginIAP.framework to /Users/ernesernesto/Documents/project/sudomine/proj.ios_mac/PluginIAP.framework
 skipped xcode_add_framework sdkbox.framework
 adding framework PluginIAP.framework
 skipped xcode_add_framework Security.framework
 skipped xcode_add_framework StoreKit.framework
 skipped xcode_add_framework SystemConfiguration.framework
 skipped xcode_add_source sdkbox_config.json None
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/libs/sdkbox.jar to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/libs/sdkbox.jar
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/libs/PluginIAP.jar to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/libs/PluginIAP.jar
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/libs/PluginGooglePlay.jar to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/libs/PluginGooglePlay.jar
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/libs/sdkbox.jar to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/libcocos2dx/libs/sdkbox.jar
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/libs/PluginIAP.jar to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/libcocos2dx/libs/PluginIAP.jar
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/libs/PluginGooglePlay.jar to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/libcocos2dx/libs/PluginGooglePlay.jar
 skipped copy_file /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/jni/sdkbox /Users/ernesernesto/Documents/project/sudomine/proj.android/jni/sdkbox
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/jni/pluginiap to /Users/ernesernesto/Documents/project/sudomine/proj.android/jni/pluginiap
 skipped copy_file /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/jni/sdkbox /Users/ernesernesto/Documents/project/sudomine/proj.android-studio/app/jni/sdkbox
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/jni/pluginiap to /Users/ernesernesto/Documents/project/sudomine/proj.android-studio/app/jni/pluginiap
 skipped android_set_permission INTERNET False
 skipped android_set_permission ACCESS_WIFI_STATE False
 skipped android_set_permission ACCESS_NETWORK_STATE False
 android added permission : com.android.vending.BILLING
 android added permission : com.android.vending.BILLING
 android added static library : PluginIAP
 android added static library : PluginIAP
 skipped android_add_static_library sdkbox
 skipped android_add_call import-add-path, $(LOCAL_PATH)
 skipped android_add_call import-module, ./sdkbox
 skipped android_add_key_value 2 LOCAL_LDLIBS -landroid None
 skipped android_add_key_value 2 LOCAL_LDLIBS -llog None
 patches found [u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.8.patch', u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.6.patch', u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.16.patch', u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.15.patch', u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.12.patch', u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.11.patch', u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.0.patch']
 patching file Cocos2dxActivity.java with patch Cocos2dxActivity.java.3.8.patch
 preprocessing patch Cocos2dxActivity.java.3.8.patch into Cocos2dxActivity.java.3.8.patch.S54o1shg.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 26  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 30  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 40  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 crlf: 0  lf: 47  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 6
 -  6 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 6
 processing 1/1:	 src/org/cocos2dx/lib/Cocos2dxActivity.java
 source file is different - src/org/cocos2dx/lib/Cocos2dxActivity.java
 failed to apply hunk 0
 >>>>>>>>>>>>>>>>>>>
 @@ -50,3 +50,4 @@
  import javax.microedition.khronos.egl.EGLConfig;
  import javax.microedition.khronos.egl.EGLDisplay;
  
 +import com.sdkbox.plugin.SDKBox;
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 1
 >>>>>>>>>>>>>>>>>>>
 @@ -301,3 +303,4 @@
          CocosPlayClient.init(this, false);
  
          onLoadNativeLibraries();
 +        SDKBox.init(this);
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 2
 >>>>>>>>>>>>>>>>>>>
 @@ -338,6 +341,18 @@
      // ===========================================================
  
      @Override
 +    protected void onStart() {
 +          super.onStart();
 +          SDKBox.onStart();
 +    }
 +    @Override
 +    protected void onStop() {
 +          super.onStop();
 +          SDKBox.onStop();
 +    }
 +
 +    @Override
      protected void onResume() {
      	Log.d(TAG, "onResume()");
          super.onResume();
 +        SDKBox.onResume();
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 3
 >>>>>>>>>>>>>>>>>>>
 @@ -364,3 +379,4 @@
      protected void onPause() {
      	Log.d(TAG, "onPause()");
          super.onPause();
 +        SDKBox.onPause();
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 4
 >>>>>>>>>>>>>>>>>>>
 @@ -374,3 +390,10 @@
      }
  
      @Override
 +    public void onBackPressed() {
 +          if(!SDKBox.onBackPressed()) {
 +            super.onBackPressed();
 +          }
 +    }
 +
 +    @Override
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 5
 >>>>>>>>>>>>>>>>>>>
 @@ -393,4 +416,6 @@
              listener.onActivityResult(requestCode, resultCode, data);
          }
  
 -        super.onActivityResult(requestCode, resultCode, data);
 +        if(!SDKBox.onActivityResult(requestCode, resultCode, data)) {
 +            super.onActivityResult(requestCode, resultCode, data);
 +        }
 <<<<<<<<<<<<<<<<<<<
 patching file Cocos2dxActivity.java with patch Cocos2dxActivity.java.3.6.patch
 preprocessing patch Cocos2dxActivity.java.3.6.patch into Cocos2dxActivity.java.3.6.patch.uPgxGX7W.sdkbox.temp
 crlf: 0  lf: 3  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 5  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 26  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 31  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 41  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 crlf: 0  lf: 48  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 6
 -  6 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 6
 processing 1/1:	 src/org/cocos2dx/lib/Cocos2dxActivity.java
 source file is different - src/org/cocos2dx/lib/Cocos2dxActivity.java
 failed to apply hunk 0
 >>>>>>>>>>>>>>>>>>>
 @@ -46,1 +46,3 @@
  import android.widget.FrameLayout;
 +import android.content.Intent;
 +import com.sdkbox.plugin.SDKBox;
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 1
 >>>>>>>>>>>>>>>>>>>
 @@ -220,1 +223,2 @@
          onLoadNativeLibraries();
 +        SDKBox.init(this);
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 2
 >>>>>>>>>>>>>>>>>>>
 @@ -248,7 +252,20 @@
      // ===========================================================
      // Methods for/from SuperClass/Interfaces
      // ===========================================================
 -
 +
 +    @Override
 +    protected void onStart() {
 +        super.onStart();
 +        SDKBox.onStart();
 +    }
 +
 +    @Override
 +    protected void onStop() {
 +        super.onStop();
 +        SDKBox.onStop();
 +    }
 +
      @Override
      protected void onResume() {
          super.onResume();
 +        SDKBox.onResume();
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 3
 >>>>>>>>>>>>>>>>>>>
 @@ -260,4 +277,4 @@
      @Override
      protected void onPause() {
          super.onPause();
 -
 +        SDKBox.onPause();
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 4
 >>>>>>>>>>>>>>>>>>>
 @@ -271,3 +289,10 @@
      }
  
      @Override
 +    public void onBackPressed() {
 +        if(!SDKBox.onBackPressed()) {
 +            super.onBackPressed();
 +        }
 +    }
 +
 +    @Override
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 5
 >>>>>>>>>>>>>>>>>>>
 @@ -298,4 +323,6 @@
              listener.onActivityResult(requestCode, resultCode, data);
          }
  
 -        super.onActivityResult(requestCode, resultCode, data);
 +        if(!SDKBox.onActivityResult(requestCode, resultCode, data)) {
 +            super.onActivityResult(requestCode, resultCode, data);
 +        }
 <<<<<<<<<<<<<<<<<<<
 patching file Cocos2dxActivity.java with patch Cocos2dxActivity.java.3.16.patch
 preprocessing patch Cocos2dxActivity.java.3.16.patch into Cocos2dxActivity.java.3.16.patch.3pDJXItC.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 28  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 32  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 42  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 crlf: 0  lf: 49  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 6
 -  6 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 6
 processing 1/1:	 src/org/cocos2dx/lib/Cocos2dxActivity.java
 already patched  src/org/cocos2dx/lib/Cocos2dxActivity.java
 failed to apply hunk 2
 >>>>>>>>>>>>>>>>>>>
 @@ -165,8 +167,20 @@
      // ===========================================================
  
      @Override
 +    protected void onStart() {
 +          super.onStart();
 +          SDKBox.onStart();
 +    }
 +    @Override
 +    protected void onStop() {
 +          super.onStop();
 +          SDKBox.onStop();
 +    }
 +
 +    @Override
      protected void onResume() {
      	Log.d(TAG, "onResume()");
          super.onResume();
          Cocos2dxAudioFocusManager.registerAudioFocusListener(this);
          this.hideVirtualButton();
 +        SDKBox.onResume();
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 3
 >>>>>>>>>>>>>>>>>>>
 @@ -196,3 +210,4 @@
      protected void onPause() {
      	Log.d(TAG, "onPause()");
          super.onPause();
 +        SDKBox.onPause();
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 4
 >>>>>>>>>>>>>>>>>>>
 @@ -203,3 +218,10 @@
      }
      
      @Override
 +    public void onBackPressed() {
 +          if(!SDKBox.onBackPressed()) {
 +            super.onBackPressed();
 +          }
 +    }
 +
 +    @Override
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 5
 >>>>>>>>>>>>>>>>>>>
 @@ -230,4 +252,6 @@
              listener.onActivityResult(requestCode, resultCode, data);
          }
  
 -        super.onActivityResult(requestCode, resultCode, data);
 +        if(!SDKBox.onActivityResult(requestCode, resultCode, data)) {
 +            super.onActivityResult(requestCode, resultCode, data);
 +        }
 <<<<<<<<<<<<<<<<<<<
 patched file Cocos2dxActivity.java
 patches found [u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/AppDelegate.cpp.cpp.3.0.patch']
 patching file AppDelegate.cpp with patch AppDelegate.cpp.cpp.3.0.patch
 preprocessing patch AppDelegate.cpp.cpp.3.0.patch into AppDelegate.cpp.cpp.3.0.patch.Cm5GOIpU.sdkbox.temp
 crlf: 0  lf: 5  cr: 0	 - file: AppDelegate.cpp hunk: 1
 crlf: 0  lf: 11  cr: 0	 - file: AppDelegate.cpp hunk: 2
 -  2 hunks for AppDelegate.cpp
 total files: 1  total hunks: 2
 processing 1/1:	 AppDelegate.cpp
 source file is different - AppDelegate.cpp
 failed to apply hunk 0
 >>>>>>>>>>>>>>>>>>>
 @@ -1,2 +1,5 @@
  #include "AppDelegate.h"
  #include "HelloWorldScene.h"
 +#ifdef SDKBOX_ENABLED
 +#include "PluginIAP/PluginIAP.h"
 +#endif
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 1
 >>>>>>>>>>>>>>>>>>>
 @@ -30,3 +31,6 @@
  }
  
  bool AppDelegate::applicationDidFinishLaunching() {
 +#ifdef SDKBOX_ENABLED
 +    sdkbox::IAP::init();
 +#endif
 <<<<<<<<<<<<<<<<<<<
 failed to patch file AppDelegate.cpp
 Please reference the online documentation to finish the integration:
http://sdkbox-doc.github.io/en/plugins/iap/v3-cpp/
 
 >>> WARNING <<<
 Some installation steps failed.
 Please refer to the online documentation, for instructions on how to complete the installation manually.
 Installation completed with errors :|
 
 Performing at_exit cleanup.
 Tracking: {'cocos_installation': '3.16.0', 'sdkbox_version': '1.0.1.32', 'cocos': '3.16.0', 'args': {'verbose': 2, 'legacy': None, 'installer': '/Users/ernesernesto/.sdkbox/bin/sdkbox.pyc', 'manifest': 'manifest.json', 'nopatching': 0, 'runin': None, 'patcherrors': 0, 'project': '/Users/ernesernesto/Documents/project/sudomine/', 'noupdate': 0, 'silenttime': None, 'mvalue': None, 'nopatchingcpp': 0, 'local': 0, 'nohelp': 0, 'dryrun': None, 'jsonapi': 0, 'symbol': None, 'apitoken': None, 'mkey': None, 'info': None, 'remote': 1, 'plugin': u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/', 'forcecopy': 0, 'days': 10, 'server': 'download.sdkbox.com/installer/v1/', 'forcedownload': 0, 'command': 'import', 'alwaysupdate': 0}, 'return_status': 'patch_failed'}

As you can see, there are many patch that got rejected.
But strangely running the same command again shows a different output like this

  _______ ______  _     _ ______   _____  _     _
  |______ |     \ |____/  |_____] |     |  \___/
  ______| |_____/ |    \_ |_____] |_____| _/   \_
 Copyright (c) 2016-2017 SDKBOX Inc. v1.0.1.32
 test speed of hosts...
 - test host main: 487.07KB/s.
 - test host china: 27.93KB/s.
 choose the fastest server 'main', speed is 487.07KB/s.
 Please reference the online documentation to finish the integration:
http://sdkbox-doc.github.io/en/plugins/iap/v3-cpp/
 Installation Successful :)

The other things that I noticed that after running it the second time, even though it shows that installation successfull, the previous attempted patch at java files didn’t happen, I see no java files get modified on my repo.

Is there anything wrong with the current sdkbox installer? I don’t want to delve deep into integrating IAP and facebook manually as listed on the documents, I hope integrating third party would be as painless as sdkbox suggest but apparantly it currently isn’t

The installations also fails with sdkbox import facebook -vv,
but sdkbox import admob works, it also installs google play services and googleanalytics though

Thanks for your help


#2

Quick updates, seems to me this happens because the patch is modifying internal cocos java files,
And I did use a symbolic link for all cocos files since I don’t want redundant files duplicated between projects, I want those files shared for all of my projects.

Question is, how do I point the patch to apply to my “actual” files not the files that I symbolicated link with?


#3

Even after placing the cocos folder inside my project (not using symbolic link), the patch still got rejected. Any idea on how to fix this? Which version of sdkbox that is correct for cocos2dx ver 3.16?

  _______ ______  _     _ ______   _____  _     _
  |______ |     \ |____/  |_____] |     |  \___/ 
  ______| |_____/ |    \_ |_____] |_____| _/   \_
 Copyright (c) 2016-2017 SDKBOX Inc. v1.0.1.32
 test speed of hosts...
 - test host main: 202.64KB/s.
 - test host china: 21.03KB/s.
 choose the fastest server 'main', speed is 202.64KB/s.
 Namespace(alwaysupdate=0, apitoken=None, command='import', days=10, dryrun=None, forcecopy=0, forcedownload=0, info=None, installer='/Users/ernesernesto/.sdkbox/bin/sdkbox.pyc', jsonapi=0, legacy=None, local=0, manifest='manifest.json', mkey=None, mvalue=None, nohelp=0, nopatching=0, nopatchingcpp=0, noupdate=0, patcherrors=0, plugin='iap/', project='/Users/ernesernesto/Documents/project/sudomine/', remote=1, runin=None, server='download.sdkbox.com/installer/v1/', silenttime=None, symbol=None, verbose=2)

// OMITTED PACKAGE INFO

 share scientificrevenue chartboost googleanalytics review gpg googleplayservices anysdk fyber iap unityads firebase sdkboxads apteligent amazon gameroom facebook SDKBOX tapcore tune youtube appnext admob sdkboxplay appodeal onesignal adcolony
 cocos2d-x installation directory /Applications/Cocos/Cocos2d-x/cocos2d-x-3.16/
 cocos2d-x header directory /Applications/Cocos/Cocos2d-x/cocos2d-x-3.16/cocos/
 cocos2d-x installation version 3.16.0
 looking for cocos2d.h at /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos
 cocos2d-x project root /Users/ernesernesto/Documents/project/sudomine/
 fallback to cocos project search False
 cocos2d-x project type cpp
 loaded package manifest
 loaded cocos project
 iOS project dirs ['/Users/ernesernesto/Documents/project/sudomine/proj.ios_mac']
 loaded xcode project
 failed to load visual studio project
 loaded android project
 load android studio project
 supported projects cocos ios android android studio
 package base name iap
 skipping download of sdkbox-iap_v2.3.17.7.tar.gz, already exists as /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/
 setting plugin source to /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/
 SHA1 of downloaded package b8d0d7d79f265e0148b43e13fbc9efda95bad8c3
 adding to backup .sdkbox_packages.json.sPLQ1496.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/.sdkbox_packages.json
 adding to backup project.pbxproj.65sic7gq.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/proj.ios_mac/sudomine.xcodeproj/project.pbxproj
 adding to backup Android.mk.bzeUWH9t.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/proj.android/jni/Android.mk
 adding to backup Application.mk.taLe7WKG.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/proj.android/jni/Application.mk
 adding to backup AndroidManifest.xml.VajsroXG.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/proj.android/AndroidManifest.xml
 adding to backup project.properties.PNcDXnsw.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/proj.android/project.properties
 found sdkbox.package at /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/sdkbox.package
 defining constant SDKBOX_PLUGIN_NAME=>IAP
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.8.patch
 preprocessing patch Cocos2dxActivity.java.3.8.patch into Cocos2dxActivity.java.3.8.patch.m25CdlgL.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 26  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 30  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 40  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 crlf: 0  lf: 47  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 6
 -  6 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 6
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = False
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.6.patch
 preprocessing patch Cocos2dxActivity.java.3.6.patch into Cocos2dxActivity.java.3.6.patch.FEq63NAS.sdkbox.temp
 crlf: 0  lf: 3  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 5  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 26  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 31  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 41  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 crlf: 0  lf: 48  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 6
 -  6 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 6
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = False
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.16.patch
 preprocessing patch Cocos2dxActivity.java.3.16.patch into Cocos2dxActivity.java.3.16.patch.i0BdNgJF.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 28  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 32  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 42  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 crlf: 0  lf: 49  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 6
 -  6 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 6
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = False
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.15.patch
 preprocessing patch Cocos2dxActivity.java.3.15.patch into Cocos2dxActivity.java.3.15.patch.sowZMyNt.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 27  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 44  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 51  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 -  5 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 5
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = False
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.12.patch
 preprocessing patch Cocos2dxActivity.java.3.12.patch into Cocos2dxActivity.java.3.12.patch.njeTZm6K.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 27  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 42  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 49  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 -  5 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 5
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = False
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.11.patch
 preprocessing patch Cocos2dxActivity.java.3.11.patch into Cocos2dxActivity.java.3.11.patch.eD1qUMEl.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 26  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 42  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 49  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 -  5 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 5
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = False
 checking patch status of file Cocos2dxActivity.java against patch Cocos2dxActivity.java.3.0.patch
 preprocessing patch Cocos2dxActivity.java.3.0.patch into Cocos2dxActivity.java.3.0.patch.pkh3Nr80.sdkbox.temp
 crlf: 0  lf: 5  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 9  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 40  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 44  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 -  4 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 4
 has_patched: /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java = False
 adding to backup Cocos2dxActivity.java.LI2gak6D.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java
 checking patch status of file AppDelegate.cpp against patch AppDelegate.cpp.cpp.3.0.patch
 preprocessing patch AppDelegate.cpp.cpp.3.0.patch into AppDelegate.cpp.cpp.3.0.patch.Z28SMmJt.sdkbox.temp
 crlf: 0  lf: 5  cr: 0	 - file: AppDelegate.cpp hunk: 1
 crlf: 0  lf: 11  cr: 0	 - file: AppDelegate.cpp hunk: 2
 -  2 hunks for AppDelegate.cpp
 total files: 1  total hunks: 2
 has_patched: /Users/ernesernesto/Documents/project/sudomine/Classes/AppDelegate.cpp = False
 adding to backup AppDelegate.cpp.sjXQdqoT.sdkbox.temp as /Users/ernesernesto/Documents/project/sudomine/Classes/AppDelegate.cpp
 Saving to /Users/ernesernesto/Documents/project/sudomine/proj.android/AndroidManifest.xml from AndroidManifest.xml.VajsroXG.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java from Cocos2dxActivity.java.LI2gak6D.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/proj.ios_mac/sudomine.xcodeproj/project.pbxproj from project.pbxproj.65sic7gq.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/proj.android/jni/Android.mk from Android.mk.bzeUWH9t.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/Classes/AppDelegate.cpp from AppDelegate.cpp.sjXQdqoT.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/.sdkbox_packages.json from .sdkbox_packages.json.sPLQ1496.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/proj.android/project.properties from project.properties.PNcDXnsw.sdkbox.temp
 Saving to /Users/ernesernesto/Documents/project/sudomine/proj.android/jni/Application.mk from Application.mk.taLe7WKG.sdkbox.temp
 Creating backup archive /Users/ernesernesto/Documents/project/sudomine/backup-2018-02-20.zip
 Backup Completed.
 skipped xcode_add_compiler_flag -DSDKBOX_ENABLED
 skipped android_add_key_value 2 LOCAL_CPPFLAGS -DSDKBOX_ENABLED None
 skipped copy_file /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/ios/sdkbox.framework /Users/ernesernesto/Documents/project/sudomine/proj.ios_mac/sdkbox.framework
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/ios/PluginIAP.framework to /Users/ernesernesto/Documents/project/sudomine/proj.ios_mac/PluginIAP.framework
 skipped xcode_add_framework sdkbox.framework
 adding framework PluginIAP.framework
 skipped xcode_add_framework Security.framework
 skipped xcode_add_framework StoreKit.framework
 skipped xcode_add_framework SystemConfiguration.framework
 skipped xcode_add_source sdkbox_config.json None
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/libs/sdkbox.jar to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/libs/sdkbox.jar
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/libs/PluginIAP.jar to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/libs/PluginIAP.jar
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/libs/PluginGooglePlay.jar to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/java/libs/PluginGooglePlay.jar
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/libs/sdkbox.jar to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/libcocos2dx/libs/sdkbox.jar
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/libs/PluginIAP.jar to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/libcocos2dx/libs/PluginIAP.jar
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/libs/PluginGooglePlay.jar to /Users/ernesernesto/Documents/project/sudomine/cocos2d/cocos/platform/android/libcocos2dx/libs/PluginGooglePlay.jar
 skipped copy_file /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/jni/sdkbox /Users/ernesernesto/Documents/project/sudomine/proj.android/jni/sdkbox
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/jni/pluginiap to /Users/ernesernesto/Documents/project/sudomine/proj.android/jni/pluginiap
 skipped copy_file /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/jni/sdkbox /Users/ernesernesto/Documents/project/sudomine/proj.android-studio/app/jni/sdkbox
 copy /Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/android/jni/pluginiap to /Users/ernesernesto/Documents/project/sudomine/proj.android-studio/app/jni/pluginiap
 skipped android_set_permission INTERNET False
 skipped android_set_permission ACCESS_WIFI_STATE False
 skipped android_set_permission ACCESS_NETWORK_STATE False
 android added permission : com.android.vending.BILLING
 android added permission : com.android.vending.BILLING
 android added static library : PluginIAP
 android added static library : PluginIAP
 skipped android_add_static_library sdkbox
 skipped android_add_call import-add-path, $(LOCAL_PATH)
 skipped android_add_call import-module, ./sdkbox
 skipped android_add_key_value 2 LOCAL_LDLIBS -landroid None
 skipped android_add_key_value 2 LOCAL_LDLIBS -llog None
 patches found [u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.8.patch', u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.6.patch', u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.16.patch', u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.15.patch', u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.12.patch', u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.11.patch', u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/Cocos2dxActivity.java.3.0.patch']
 patching file Cocos2dxActivity.java with patch Cocos2dxActivity.java.3.8.patch
 preprocessing patch Cocos2dxActivity.java.3.8.patch into Cocos2dxActivity.java.3.8.patch.Z42r6wxg.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 26  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 30  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 40  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 crlf: 0  lf: 47  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 6
 -  6 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 6
 processing 1/1:	 src/org/cocos2dx/lib/Cocos2dxActivity.java
 source file is different - src/org/cocos2dx/lib/Cocos2dxActivity.java
 failed to apply hunk 0
 >>>>>>>>>>>>>>>>>>>
 @@ -50,3 +50,4 @@
  import javax.microedition.khronos.egl.EGLConfig;
  import javax.microedition.khronos.egl.EGLDisplay;
  
 +import com.sdkbox.plugin.SDKBox;
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 1
 >>>>>>>>>>>>>>>>>>>
 @@ -301,3 +303,4 @@
          CocosPlayClient.init(this, false);
  
          onLoadNativeLibraries();
 +        SDKBox.init(this);
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 2
 >>>>>>>>>>>>>>>>>>>
 @@ -338,6 +341,18 @@
      // ===========================================================
  
      @Override
 +    protected void onStart() {
 +          super.onStart();
 +          SDKBox.onStart();
 +    }
 +    @Override
 +    protected void onStop() {
 +          super.onStop();
 +          SDKBox.onStop();
 +    }
 +
 +    @Override
      protected void onResume() {
      	Log.d(TAG, "onResume()");
          super.onResume();
 +        SDKBox.onResume();
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 3
 >>>>>>>>>>>>>>>>>>>
 @@ -364,3 +379,4 @@
      protected void onPause() {
      	Log.d(TAG, "onPause()");
          super.onPause();
 +        SDKBox.onPause();
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 4
 >>>>>>>>>>>>>>>>>>>
 @@ -374,3 +390,10 @@
      }
  
      @Override
 +    public void onBackPressed() {
 +          if(!SDKBox.onBackPressed()) {
 +            super.onBackPressed();
 +          }
 +    }
 +
 +    @Override
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 5
 >>>>>>>>>>>>>>>>>>>
 @@ -393,4 +416,6 @@
              listener.onActivityResult(requestCode, resultCode, data);
          }
  
 -        super.onActivityResult(requestCode, resultCode, data);
 +        if(!SDKBox.onActivityResult(requestCode, resultCode, data)) {
 +            super.onActivityResult(requestCode, resultCode, data);
 +        }
 <<<<<<<<<<<<<<<<<<<
 patching file Cocos2dxActivity.java with patch Cocos2dxActivity.java.3.6.patch
 preprocessing patch Cocos2dxActivity.java.3.6.patch into Cocos2dxActivity.java.3.6.patch.IQwavenC.sdkbox.temp
 crlf: 0  lf: 3  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 5  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 26  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 31  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 41  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 crlf: 0  lf: 48  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 6
 -  6 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 6
 processing 1/1:	 src/org/cocos2dx/lib/Cocos2dxActivity.java
 source file is different - src/org/cocos2dx/lib/Cocos2dxActivity.java
 failed to apply hunk 0
 >>>>>>>>>>>>>>>>>>>
 @@ -46,1 +46,3 @@
  import android.widget.FrameLayout;
 +import android.content.Intent;
 +import com.sdkbox.plugin.SDKBox;
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 1
 >>>>>>>>>>>>>>>>>>>
 @@ -220,1 +223,2 @@
          onLoadNativeLibraries();
 +        SDKBox.init(this);
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 2
 >>>>>>>>>>>>>>>>>>>
 @@ -248,7 +252,20 @@
      // ===========================================================
      // Methods for/from SuperClass/Interfaces
      // ===========================================================
 -
 +
 +    @Override
 +    protected void onStart() {
 +        super.onStart();
 +        SDKBox.onStart();
 +    }
 +
 +    @Override
 +    protected void onStop() {
 +        super.onStop();
 +        SDKBox.onStop();
 +    }
 +
      @Override
      protected void onResume() {
          super.onResume();
 +        SDKBox.onResume();
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 3
 >>>>>>>>>>>>>>>>>>>
 @@ -260,4 +277,4 @@
      @Override
      protected void onPause() {
          super.onPause();
 -
 +        SDKBox.onPause();
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 4
 >>>>>>>>>>>>>>>>>>>
 @@ -271,3 +289,10 @@
      }
  
      @Override
 +    public void onBackPressed() {
 +        if(!SDKBox.onBackPressed()) {
 +            super.onBackPressed();
 +        }
 +    }
 +
 +    @Override
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 5
 >>>>>>>>>>>>>>>>>>>
 @@ -298,4 +323,6 @@
              listener.onActivityResult(requestCode, resultCode, data);
          }
  
 -        super.onActivityResult(requestCode, resultCode, data);
 +        if(!SDKBox.onActivityResult(requestCode, resultCode, data)) {
 +            super.onActivityResult(requestCode, resultCode, data);
 +        }
 <<<<<<<<<<<<<<<<<<<
 patching file Cocos2dxActivity.java with patch Cocos2dxActivity.java.3.16.patch
 preprocessing patch Cocos2dxActivity.java.3.16.patch into Cocos2dxActivity.java.3.16.patch.ZuEzJVHF.sdkbox.temp
 crlf: 0  lf: 4  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 1
 crlf: 0  lf: 8  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 2
 crlf: 0  lf: 28  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 3
 crlf: 0  lf: 32  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 4
 crlf: 0  lf: 42  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 5
 crlf: 0  lf: 49  cr: 0	 - file: src/org/cocos2dx/lib/Cocos2dxActivity.java hunk: 6
 -  6 hunks for src/org/cocos2dx/lib/Cocos2dxActivity.java
 total files: 1  total hunks: 6
 processing 1/1:	 src/org/cocos2dx/lib/Cocos2dxActivity.java
  hunk no.7 for file src/org/cocos2dx/lib/Cocos2dxActivity.java  -- is ready to be patched
 processing target file src/org/cocos2dx/lib/Cocos2dxActivity.java
 hunk 1
 hunk 2
 hunk 3
 hunk 4
 hunk 5
 hunk 6
 successfully patched 1/1:	 src/org/cocos2dx/lib/Cocos2dxActivity.java
 patched file Cocos2dxActivity.java
 patches found [u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/plugin/AppDelegate.cpp.cpp.3.0.patch']
 patching file AppDelegate.cpp with patch AppDelegate.cpp.cpp.3.0.patch
 preprocessing patch AppDelegate.cpp.cpp.3.0.patch into AppDelegate.cpp.cpp.3.0.patch.CQyjZxic.sdkbox.temp
 crlf: 0  lf: 5  cr: 0	 - file: AppDelegate.cpp hunk: 1
 crlf: 0  lf: 11  cr: 0	 - file: AppDelegate.cpp hunk: 2
 -  2 hunks for AppDelegate.cpp
 total files: 1  total hunks: 2
 processing 1/1:	 AppDelegate.cpp
 source file is different - AppDelegate.cpp
 failed to apply hunk 0
 >>>>>>>>>>>>>>>>>>>
 @@ -1,2 +1,5 @@
  #include "AppDelegate.h"
  #include "HelloWorldScene.h"
 +#ifdef SDKBOX_ENABLED
 +#include "PluginIAP/PluginIAP.h"
 +#endif
 <<<<<<<<<<<<<<<<<<<
 failed to apply hunk 1
 >>>>>>>>>>>>>>>>>>>
 @@ -30,3 +31,6 @@
  }
  
  bool AppDelegate::applicationDidFinishLaunching() {
 +#ifdef SDKBOX_ENABLED
 +    sdkbox::IAP::init();
 +#endif
 <<<<<<<<<<<<<<<<<<<
 failed to patch file AppDelegate.cpp
 Please reference the online documentation to finish the integration:
http://sdkbox-doc.github.io/en/plugins/iap/v3-cpp/
 
 >>> WARNING <<<
 Some installation steps failed.
 Please refer to the online documentation, for instructions on how to complete the installation manually.
 Installation completed with errors :|
 
 Performing at_exit cleanup.
 Tracking: {'cocos_installation': '3.16.0', 'sdkbox_version': '1.0.1.32', 'cocos': '3.16.0', 'args': {'verbose': 2, 'legacy': None, 'installer': '/Users/ernesernesto/.sdkbox/bin/sdkbox.pyc', 'manifest': 'manifest.json', 'nopatching': 0, 'runin': None, 'patcherrors': 0, 'project': '/Users/ernesernesto/Documents/project/sudomine/', 'noupdate': 0, 'silenttime': None, 'mvalue': None, 'nopatchingcpp': 0, 'local': 0, 'nohelp': 0, 'dryrun': None, 'jsonapi': 0, 'symbol': None, 'apitoken': None, 'mkey': None, 'info': None, 'remote': 1, 'plugin': u'/Users/ernesernesto/.sdkbox/plugins/sdkbox-iap_v2.3.17.7/', 'forcecopy': 0, 'days': 10, 'server': 'download.sdkbox.com/installer/v1/', 'forcedownload': 0, 'command': 'import', 'alwaysupdate': 0}, 'return_status': 'patch_failed'}


#4

In this case you can follow the manual integration guide.
http://sdkbox-doc.github.io/en/plugins/iap/


#5

Of course I could, but I wouldn’t since what sdkbox suggest by using their libs that this would really lift of the pain of integrating all third party sdks.

Is there any way that the patch from sdkbox could apply to symbolic link files? or I mean is there any way to modify the patch? I’m asking for a link from official sdkbox repo or something that I could modify in order for the patch to successfully runs


#6

We can provide samples for how to make linked projects work and we’ll work on a solution for automatic intsallation, but It will take sometime maybe a month. Sorry for the inconvenience.


#7

you can set the engine_type to prebuilt in .cocos-project.json file:

Example:

{
    "engine_type": "prebuilt", 
    "engine_version": "cocos2d-x-3.8", 
    "project_type": "cpp"
}