SDKBox 2.4.3.3 support CMake

2.4.3.3 (20190127)

Add

  1. AdMob support application id, appid field in sdkbox_config.json file
  2. AdMob support testdevice, testdevice field in sdkbox_config.json file
  3. IAP add iOS paydeferred status
  4. OneSignal support GDPR with api setRequiresUserPrivacyConsent, consentGranted, requiresUserPrivacyConsent
  5. Facebook check com.facebook.sdk.ApplicationId and com.facebook.FacebookContentProvider when sdkbox::PluginFacebook:init
  6. Support CMake from cocos2d-x 3.17.1
  7. Binding sdkbox::init and sdkbox::setProject to Lua and JavaScript

Upgrade

  1. AdMob update iOS SDK 7.30.0
  2. OngSignal update iOS SDK 2.9.5, Android 3.10.6

Bugfix

  1. Fixed failed to patch appactivity.java with Cocos Creator 1.9.3
  2. Fixed JSB2: fix JSListenerBase::invokeJSFun crash for all plugins
  3. Fixed IAP: add getInitializedErrMsg api for this issue
  4. Fixed Case Sensitive with imoprt module in Android.mk file. Such as $(call import-module, ./PluginOneSignal)

Thanks,

1 Like

I see this has been added based on the thread at Handling of failed deferred IAPs (SK Payment TransactionStateDeferred) and remote verification failures

However is there any documentation on the actual paydeferred status? Where is this status returned, by what function? This is exactly what needs fixing in the documentation, a new response has been added but it is a complete mystery how it is sent and when.

Additionally, how are we supposed to finish deferred purchases once they have been approved? Is the only way really relaunch the app? This seems like very a very bad user experience flow

same with pay suceess, will trigger onDeferred event in IAP Listener.

and, shouldn’t finish a deferred status pay.

and for most developer, i guess, needn’t case about deferred status.

Where is this documented? I see no mention of onDeferred in http://docs.sdkbox.com/en/plugins/iap/v3-cpp/#listeners

I’m not sure what you mean by this sorry, is this to do with how to complete a deferred purchase? How do we complete a deferred purchase/ get the receipt for it?

Any updates on this? How do we perform server-side validation of deferred purchases?

The delay is the middle state.

If you have some special features, you can check the Listener event ‘onDefered’ with the parameter "Product ".

Yes I understand, however a deferred product will eventually be completed.

How do we get the receipt & receiptcipheredpayload for a deferred product that is completed at a later time?

onDefered will send parameter “Product”, can get receipt from “Product”, same with “onSuccess”

Sorry but this is really really unclear! Can you please make documentation for your SDK’s new features? This method is undocumented and there are no instructions how to handle this purchase flow.

if onDefered contains a product that has a receipt just as onSuccess, this receipt will not be for a completed purchase right?
How do we know when this purchase has been completed or how do we check? is this possible from the SDK?

Or, am I correct in presuming that this is not possible and that we need to add a manual button to the app to send this receipt to our server to check against App Store API for having been completed? Will this receipt become ‘valid’ at a later time?

Added later: from some research I’m led to believe that the receipt for a deferred purchase will not be valid (will not contain in_app data when sent for verification) and therefore cannot be used to verify a purchase

Looking at the method header file I see the text

/**
     * Called when IAP pay deferred
     *
     * Note: Pay deferred status is a middle status, for most developer, needn't case this status
     * this status will change to success or failed or cancel, its final status is pending external action.
     *
     * Please DO NOT finishTransaction when status is deferred.
     *
     */

But what is status, What does this status will change mean? This is not a property or a field on a product, this is a callback!

Does this imply that onSuccess() will be called at a later time? Automatically?

onSuceess or onFailed will be called at a later time.

follow is SKPaymentTransactionState.deferred's descrpiton

The transaction is in the queue, but its final status is pending external action such as Ask to Buy. Update your UI to show the deferred state, and wait for another callback that indicates the final status.

https://developer.apple.com/documentation/storekit/skpaymenttransactionstate/deferred
https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/DeliverProduct.html

Great! That’s great to hear, it exactly explains the usage.

Can I assume that this means that when onSuccess() or onFailed() are called, the product will have a correctly updated and working receiptCipheredPayload? and this has been tested? (There are some comments online where the in_app returned for a non-updated receipt will still remain null after the purchase has completed

Additionally, I see that onDeferred() is also called at times during app startup, as onSuccess would be too, can these also happen during the app running/resuming from the foreground?

ehhh,
i have a question.

Do you know what the ’ deferred ’ state means?
Under what circumstances will Apple send ’ deferred ’ out?

a example case:

a child account C,
a parent account P

C purchase a product, apple will send deferred status out. and send confirm dialog to P.

  • P approve this purchase, apple will send purchased status, so the IAPListener onSuccess will trigger.
  • P decline this purchase, apple will send failed status, so the IAPListener onFailed will trigger.
  • P ignore this purchase, app will send failed status also.

Is this a question to check that I know the usage or actually a question regarding StoreKit?
If it’s about StoreKit I don’t know the specifics, I am trying to use SDKBox to avoid having to know them.

My only experience on this matter is that the previous sdkbox version did not support the flow and that customers were frustrated with failed purchases.

you request deferred status in another thread. so, you think the customer purchase failed was caused by deferred missing.

from my example case, you can know, deferred status will change to success or failed at last.

Re:

  1. Support CMake from cocos2d-x 3.17.1

The ADCololony CMake for Android does not import the libjs.so and libadcolony.so resulting in

   java.lang.UnsatisfiedLinkError: dlopen failed: library "libjs.so" not found
       at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
       at java.lang.System.loadLibrary(System.java:1669)
       at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:116)

thanks for reporting the issue

plz update to AdColony 3.3.8, ref to https://github.com/sdkbox/sdkbox-sample-adcolony/blob/master/cpp.

  1. replace with https://github.com/sdkbox/sdkbox-sample-adcolony/blob/master/cpp/proj.android/libs/adcolony.jar
  2. modify AppActivity.java
        // System.loadLibrary("js");
        // System.loadLibrary("adcolony");

Thanks,

The method above did not work for me, but I realized all it takes it to add this to build.gradle:

android {
    sourceSets.main {
        jniLibs.srcDirs = ['jni/PluginAdColony/libs_c++_static']
   }
}