logo hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    In app purchases

    Scheduled Pinned Locked Moved Solved
    Help and Support
    3
    10
    901
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • iTap DevelopmentI
      iTap Development
      last edited by

      Can you add in app purchases to an exported project in Xcode or do we have to wait for behaviors?
      I'm going to need to add it!

      Jack8680J 1 Reply Last reply Reply Quote 0
      • Jack8680J
        Jack8680 @iTap Development
        last edited by Jack8680

        @iTap-Development Once you export you can add in app purchases, but there's no way to do it through hyperPad yet, you have to do it yourself. To make the in app purchase do something within the game, I'm guessing the easiest way is to have a behaviour bundle that is off that will trigger when the purchase is done, and then through Xcode I think you can trigger that behaviour bundle when the transaction completes.

        1 Reply Last reply Reply Quote 1
        • MurtazaM
          Murtaza Admin
          last edited by

          Actually you can't.
          Although yes, you are given an XCode project, and you can code certain things on top of hyperPad. There is currently no way to interact with existing hyperPad logic.

          So for example, you create a button in hyperPad that is supposed to buy 100 coins.

          The Xcode side of things has no idea thus button exists, or coins have been purchased.

          You'd need to wait for our "Execute Code" behaviour (not actual name). This behaviour is for exported projects only. It's designed to run a block of Objective C or swift. So when you press your buy coins, it execute some in-app purchase code written in xcode.

          Until that happens I can't think of an easy, or good way of doing in-app purchases.

          iTap DevelopmentI 1 Reply Last reply Reply Quote 0
          • iTap DevelopmentI
            iTap Development @Murtaza
            last edited by

            @Murtaza would apple let people buy coins in a website separate from your app and use http requests to update the users account?
            Would that work?

            1 Reply Last reply Reply Quote 0
            • MurtazaM
              Murtaza Admin
              last edited by

              If the purchase can be done with in the app they will reject you. So don't open a website within the app that lets you buy coins.

              Even still, it may cause potential issues just mentioning it. Best thing to do is avoid in-app purchases for now and give coins based on ads.

              iTap DevelopmentI Jack8680J 3 Replies Last reply Reply Quote 0
              • iTap DevelopmentI
                iTap Development @Murtaza
                last edited by

                @Murtaza ok. You should add that behavior soon!

                1 Reply Last reply Reply Quote 0
                • iTap DevelopmentI
                  iTap Development @Murtaza
                  last edited by

                  @Murtaza could you add a coin buying system in the Xcode project that updated your number of coins on your server, and then the Hyperpad side could get the number of coins from the server?

                  MurtazaM 1 Reply Last reply Reply Quote 0
                  • Jack8680J
                    Jack8680 @Murtaza
                    last edited by Jack8680

                    @Murtaza oh, I assumed it kept a structure similar to the SQLite files in the .tap. That must be annoying then to not be able to add in-app purchases. I'm guessing they could use http in the next version to get what purchases a user has made, and then make a separate http request when a user makes a purchase via Xcode? Although this would be a bit of effort to set up... Can save values easily be modified? Or some kind of variable like an attribute?

                    1 Reply Last reply Reply Quote 0
                    • MurtazaM
                      Murtaza Admin @iTap Development
                      last edited by

                      @iTap-Development said in In app purchases:

                      @Murtaza could you add a coin buying system in the Xcode project that updated your number of coins on your server, and then the Hyperpad side could get the number of coins from the server?

                      Yes you could do that. You'd probably set up a socket connection so it's always up to date/monitoring.

                      iTap DevelopmentI 1 Reply Last reply Reply Quote 0
                      • iTap DevelopmentI
                        iTap Development @Murtaza
                        last edited by

                        @Murtaza ok!

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post