Forums

OverviewV-Play 1 Support › spongeStore.printStoreProductLists() = undefined

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6087

    Philipp

    Hi!

    I am using the Store plugin and therefore have a Store defined in my main.qml as in the tutorial

     

    Store {
            id: spongeStore
    
            version: 1
            // Replace with your own custom secret
            secret: "com.xxmasseveloper.sponge.store.secret"
            // From Google Play Developer Console
            androidPublicKey: "somecode"
    
            goods: [
                SingleUseGood {
                    id: skillPoint
                    itemId: "skill_point_id"
                    name: "Skill Point"
                    description: "A skill point to enhance your sponges abilities"
                    purchaseType: StorePurchase { id: skillPointPurchase; productId: skillPoint.itemId; price: 0.89;}
                }
            ]
    
            onStorePurchased: {
                if(itemId === skillPoint.itemId){
                    spongeController.increaseAvailableSkillPoints();
                }
            }
    
            onStorePurchaseStarted: {
                console.debug("Store purchases started with id:", itemId)
            }
    
            onStorePurchaseCancelled: {
                console.debug("Store purchases cancelled with id:", itemId)
            }
    
            onRestoreAllTransactionsFinished: {
                console.debug("Restore all transactions succeeded:", success)
            }
    
            onRestoreAllTransactionsStarted: {
                console.debug("Restore all transactions started")
            }
    
            onItemNotFoundError: {
                console.debug("Item for transaction not found:", itemId)
            }
    
            onInsufficientFundsError: {
                console.debug("Not enough gold nuggets for that one...")
    
                nativeUtils.displayMessageBox("Out of Gold", "You're out of gold, you can however purchase some nuggets again.")
            }
        }

     

    In the onCompleted of the GameWindow i do the following:

     

    Component.onCompleted: {
           console.debug(spongeStore.printStoreProductLists());
        }

     

    The log output however is always: undefined

     

    Do you know why or have any suggestions?

    #6097

    Alex
    V-Play Team

    Hi,

    the method already prints the information to the log output, so you do not need any further console.debug() calls. If you try the method on your desktop system it however won’t print any information as this one is only implemented for iOS and Android until the next released daily build. :)

    Best,

    Alex

    #6098

    Philipp

    Ok

    It would be really helpful if the documentation would be right as this cost me nearly 2 hours time – here a short quote of your documentation of this method:

    “Here is how to use the method:

    1. Define your virtual economy model and your in-app purchases like described in this document.
    2. Add a block like the following to your GameWindow item:

       Component.onCompleted: console.debug(store.printStoreProductLists())

    Be sure to remove the code snippet again before shipping your game!
    3. Run your game locally (either desktop or a mobile device) and look for log output like the following ”

    In addition I have an iPhone and I have no idea how to get that output from an iPhone

    #6099

    Alex
    V-Play Team

    Sorry for the inconveniences, you’re right. We just updated the documentation and will release it with the next daily build 1.5.3, coming today. You can then simply print your product list on your desktop system like stated above.

    Best,

    Alex

    #6100

    Alex
    V-Play Team

    Hey,

    in case you missed it, we just pushed daily build version 1.5.3, would be glad if you could give it another try. :)

    Best,

    Alex

Viewing 5 posts - 1 through 5 (of 5 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support