In app purchases
-
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! -
@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.
-
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.
-
@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? -
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.
-
@Murtaza ok. You should add that behavior soon!
-
@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?
-
@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?
-
@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.
-
@Murtaza ok!