"Has product" and "On purchase product" actions not working

0 favourites
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hello!

    My configuration: Cranberry IAP plugin, Intel XDK, iOS.

    I have a sandbox account and a collection of products in the itunes connect.

    Actions "Request store listing" and "Purchase product" works fine.

    But "Has product" and "On purchase product" do not act at all.

    Under my sandbox user in any layout I run "Has product" every 3 seconds - no reaction.

    Сan not find the reason. Everything looks right.

    I will glad to any hints.

  • When importing Intel XDK gives this error .

    Maybe this is the reason?

    Also, when the installed build , iPhone regularly asks password.

    And no longer do so when the build is removed.

  • I am no iOS expert, but according to recent C2 Cordova export this is the only thing that you should have in your intelxdk.config.additions.xml

    <!-- Change the debuggable preference to true to build a remote CDT debuggable app for -->
    <!-- Crosswalk apps on Android 4.0+ devices and Cordova apps on Android 4.4+ devices. -->
    <preference name="debuggable" value="false" />
    <!-- IMPORTANT: set the debuggable preference to false before you build for the store! -->
    
    <platform name="ios">
        <!-- below requires the splash screen plugin, otherwise ignored -->
        <!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
        <preference name="AutoHideSplashScreen" value="true" />
        <preference name="FadeSplashScreen" value="false"/>
        <preference name="FadeSplashScreenDuration" value="2"/>
        <preference name="ShowSplashScreenSpinner" value="false"/>
    
        <!-- below requires the status bar plugin, otherwise ignored -->
        <!-- docs: https://github.com/apache/cordova-plugin-statusbar -->
        <!-- see http://devgirl.org/2014/07/31/phonegap-developers-guid -->
        <preference name="StatusBarOverlaysWebView" value="false" />
        <preference name="StatusBarBackgroundColor" value="#000000" />
        <preference name="StatusBarStyle" value="lightcontent" />
    </platform>
    [/code:dvgv02gi]
    
    If you don't use [i]www [/i]subdirectory in your Intel XDK project folder then this file gets overriden and you have to set it up everytime before the build. I wrote a tutorial about it [url=http://tobyr.wtfgamesgroup.com/how-to-build-optimized-intel-xdk-crosswalk-app-properly/]http://tobyr.wtfgamesgroup.com/how-to-b ... -properly/[/url]. It's for Android Crosswalk but you will get the point because it's the same thing for iOS just different options.
    
    Also let me know which library do you use in IntelXDK for IAP? Is it this one [url=https://github.com/cranberrygame/cordova-plugin-payment-iap.git]https://github.com/cranberrygame/cordov ... nt-iap.git[/url] or some other?
  • Oh, thanks for the reply! Now I will deal with this information and answer questions .

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I do not remember how to come to this link http://cranberrygame.github.io/request_ ... a_plugins/

    (now I did it from your link). Next, I bought a plug, and received a link to Google Drive with c2addons.

    Possibly on them to understand what is library?

    I do not use the www folder. Only export from Construct and import to XDK.

  • The contents of the intelxdk.config.additions.xml that from the Construct 2

    <intelxdk:plugin intelxdk:name="cordova-plugin-inappbrowser" intelxdk:value="cordova-plugin-inappbrowser" />

    <intelxdk:plugin intelxdk:name="https://github.com/cranberrygame/cordova-plugin-payment-iap" intelxdk:value="https://github.com/cranberrygame/cordova-plugin-payment-iap" />

    <intelxdk:plugin intelxdk:name="uk.co.ilee.gamecenter" intelxdk:value="uk.co.ilee.gamecenter" />

    Apparently , the library is https://github.com/cranberrygame/cordov ... ayment-iap

  • How come you had Cordova IAP C2 plugin before purchasing? Didn't you buy it second time now?

    Anyway...

    1. Add all plugins manually with plugin manager in Intel XDK (together with https://github.com/cranberrygame/cordov ... ayment-iap)

    2. Just before building an app you should remove everything from your additions.xml if you don't use www directory

    3. Paste there the code I included in the post above

    As I said before I am no iOS expert, but this is suggested by Intel XDK to not include modules with additions. xml but with plugin manager.

    If this still won't work for you then I can't help further as I don't even have an iOS device to test, so maybe some iOS developer can give some additional hints.

  • I absolutely do not remember how to come to this link http://cranberrygame.github.io/request_ ... a_plugins/

    But most likely from here https://github.com/cranberrygame/cordov ... ayment-iap

    No, I have bought a plug-in once on March 20 2016 <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    The algorithm of actions is clear! I start....

    Thank you, BackendFreak!

  • Same.

    I have used an option "Use new Intel XDK project format" and have received

    It seems that the manual method could give.

    The behavior is exactly the same as it was before.

    Purchases work. "Has product", "On purchase product" and "Restore purchases"actions

    do not do anything .

  • Have you checked "On Restore purchases failed" condition? It also returns CordovaIAP.ErrorMessage. Maybe there is some problem with the store (settings?), not the implementation.

  • Yes, and "On Restore purchases succeded" and "...failed" do nothing. I have no idea what the store settings should be checked. It seems everything is properly setted.

  • Hey SparklingAir,

    I didn't do any iOS exports for one year now, but bere are a few ideas :

    • DO NOT add a space next to the commas when you define your products IDs (this one got me stuck for months!)
    • Restore purchases never worked for me.
    • Make a very simple test to be very sure what's working or not.
    • Not sure they are still useful, but see the related topic I posted about one year ago when I was trying to make my game to work on iOS. It wasn't easy.
    • Hang in there! You'll do it!
    • Support my game on Kickstarter with the link below (this one is completely unrelated to your problem, sorry ^^' )

    I will try to see what's still possible later today when I'll have more time available.

    Good luck!

  • SparklingAir

    What about the Action "IAP.PurchaseProduct"? Does it trigger the Buy dialog box?

    The "On Purchase" is only triggered after a successfully purchase that is initiated by the above action call.

    Next, how are you testing your app on the device? TestFlight (using Production certificate) or Adhoc test (using Adhoc provision certificate)?

    If Adhoc, then I think the IAP will not work?

    Next whats the Status (eg: Ready for Review, Approved, Ready for Submission, etc) of your IAP in iTunes Connect?

    Lastly, whats the status of your iTunes Contracts? If Financial Contracts are not effective, then IAP will not showup in the game.

  • Hello Rable!

    Thank you for reply!

    1. I have no spases after commas in "Add product ID". Moreover, adding, requesting and purchasing works fine.

    2. Thanks to BackendFreak I understood that should be used "Restore purchases" that "Has product" and "On purchase"

    conditions have begun to work. But all of them don't work.

    3. I did the test with three lines - the same.

    4,5 I will read, and, if properly understood, will continue to fight

    6. I will participate in your campaign.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)