How do I test IAP for IOS

Get help using Construct 2

Post » Tue Mar 17, 2015 9:37 am

OK, so i made my app
added it to itunes
now how do i really test that the whole IAP process really works ?
Purchase works
returning to the purchased app keeps purchase
sandbox
and so on...

The documentation on scira regrading IAP is really lacking any step by step approach and example on how do do this. Anyone having examples on the process ?
B
8
S
2
Posts: 130
Reputation: 970

Post » Tue Mar 17, 2015 3:01 pm

Im in the same situation you are. Have you being able to test IAP in test mode running it directly from Construct? I am not able to do even that.

So far I have set up all my iaps on itunes connect, they are waiting to review but from the docs I learned that even if they are waiting for review you should be able to test them with testflight and sandbox. But I have tried using TestFlight and nothing.

This are my current issues (Even testing locally with Test Mode yes):
- Purchase doesnt works
- I dont even get the purchaseFail triggered.
- Is store available always returns FALSE
- Get store listing doesnt work, It never calls on store listing received.

I hope someone in Scirra can help us with this, seems that this has been an obscure topic for some time.
Image
B
15
S
4
G
4
Posts: 134
Reputation: 3,177

Post » Wed Mar 18, 2015 8:00 am

I emailed their support yesterday morning without any answer yet. I have to admit that not answering such a key issue is worrying me as a paid member
B
8
S
2
Posts: 130
Reputation: 970

Post » Wed Mar 18, 2015 3:06 pm

Just now I managed to build the iOS app with Intel XDK, I didnt wanted to do that because I just wanted a simple Cordova app that I could manage and deploy on Xcode, but due to the problem with IAP not working on that build, and the nonexistent reply from Scirra I had to try that.

Nevertheless to build it was easy, I just got confused with my provisioning profiles and certificates but at the end I managed to have it builded successfully and deployed it on a device.

Results:
Official IAP Not working
Cranberry IAP Working good

With the Cranberry IAP plugin I was able to successfully make a purchase, I also got store listing and store available.

I will do some more testing for performance on the Intel XDK to see if its allright, then when I get home from work I will write maybe a tutorial on how to get all this working at least for the Intel XDK.
Image
B
15
S
4
G
4
Posts: 134
Reputation: 3,177

Post » Thu Mar 19, 2015 7:36 am

Great, any chance to share capx or screenshot of event sheet with Cranberry IAP ?
Thanks
Alon
B
8
S
2
Posts: 130
Reputation: 970

Post » Thu Mar 19, 2015 2:07 pm

The Cranberry IAP works exactly the same as the official IAP, the name of the functions and events are the same and you set it up exactly as the official IAP
Image
B
15
S
4
G
4
Posts: 134
Reputation: 3,177

Post » Fri Mar 20, 2015 5:58 am

Thanks I have to admit that this is the first time im doing it and i couldnt find an complete explanation on how to do a freemium app

i want to unlock some screens on one time purchase, what i am missing is
1. how to set in-p purchase (inside of the project not on the app store)
2. how to store purchase so if a user purchased and come back the app is completely open
3. how to restore purchase on a new install.

Thanks
Alon
B
8
S
2
Posts: 130
Reputation: 970

Post » Fri Mar 20, 2015 6:34 pm

For your 1st question
First on your store layout, in the

    1-On start of layout, use the Add product ID action to add the product IDs you will be using, e.g. "product1,product2,product3".

    2-After that (still in the 'Start of layout' event), use the Request store listing action. This starts downloading the names and prices of the given products. Some platforms require this information to be available for the IAP features to work.

    3-When On store listing success triggers, the product names and prices are available, and purchases can start being made or checked with the Has product condition.


For your 2nd question
So after this point you can do a purchase, on purchase successful you can store a variable on web storage or wherever you want but make that variable is persistent.

Then have your extra content to check every time for that variable, if its set then show your extra content, if its not set then you should not show it.

I still havent experimented with restoring, I will tell you when I get it
Image
B
15
S
4
G
4
Posts: 134
Reputation: 3,177

Post » Fri Mar 20, 2015 6:48 pm

Thanks. for the detailed info. When Can i store the variable on a the local device , not on web storage ?
So after a user unlocked a game and come back after a while without an internet connection it will still have the purchase available on the local machine.
B
8
S
2
Posts: 130
Reputation: 970

Post » Fri Mar 20, 2015 7:29 pm

The webstorage is permanent as long as they dont delete the app, you dont need to have network connection to access the webstorage. If they delete the app you can retrieve your purchases with the restore function, which I will investigate this weekend.
Image
B
15
S
4
G
4
Posts: 134
Reputation: 3,177

Next

Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 6 guests