Question about adding items to sell for app store

Hello,

I am attempting to setup my first in-app purchase in Corona Labs and have been following the docs and the example app. It says I need to add the products through iTunes. But can I do this in the iOS development login on the website? Or must I use iTunes? Honestly I have not even used iTunes yet. I was using TestFlightApp.com to text my apps and now saw it is gone. I may use one of the others like TestFairy.com. But right now I’m checking on adding products.

I only need to add one because it will let you upload a label you designed to a server. But because you can create a new label and pay for it I think I read where I need to do something after the purchase so it can be purchased again. It will be the same product each time.

Thanks,

Warren

There is “iTunes”, which is the program that runs on your computer to play music and download apps, access the store to buy stuff.  Then there is “iTunes Connect”, which is the developer portal where you go to setup your app, upload screenshots, write your apps name and description. This is where you setup in app purchases.

Rob

Thanks, I got connected to this and added my app. I then added the in-app purchase item. It says ready to submit. So can I test the in-app purchase now or do I have to submit my app to test? I just want to see the in-app work while testing before I deploy.

Thanks

Can this be tested through the simulator for either Android or iOS?

IAP and the .store() API can’t be tested in the simulator for any app store. They need to be built and tested on the device.

There is a sample app delivered with the simulator that shows how one would work with the store() API. There is also the below guide for IAP, and how to test it for the various app stores:

https://docs.coronalabs.com/daily/guide/monetization/IAP/index.html

Note that this is definitely not plug-and-play. It needs to be massaged to work with your own in-game store implementation, but it can be done. I feel like Android is much easier to test with at first, as it’s easier to build with the test item strings, but that’s just me.

Let us know how you get on and if you need any specific help!

Thanks for the info. So like I said I added the in-app purchase in iTunes Connect. Do I just deploy my app to a device to test to see if it works? Or do I need Apple to review my app first and then test? 

Here’s the link to the IAP guide,which is admittedly very old, but still applicable:

https://coronalabs.com/blog/2013/09/03/tutorial-understanding-in-app-purchases/

To answer your questions regarding testing IAP on iOS, I’ll quote from the doc:

Apple

  • You need specific test accounts which you can create in iTunes Connect. They are standard Apple IDs, so you will need to have a unique email address for each account. If you have your own web hosting service, you can set up aliases like “iap01@yourdomain.com” and “iap02@yourdmain.com” that send emails to your primary email address as a “catch all.” Note that Apple will make you validate the email by clicking on a link within it, so you must be able to receive it.
  • You must log out from iTunes on your device before you run the test app. This test app can be provisioned with either a Development or AdHoc profile to access the IAP sandbox. When prompted, log in with your test account.
  • You get “one shot” to buy your item because Apple remembers that your account has purchased that item. If you need to test again, you need a different account. There is no way to reset these purchases.
  • If you see “you need to submit your app and reject the binary,” you can disregard that advice.  Currently, you just need to submit your items for review — but it does take a little time for your items to propagate through Apple’s servers.

Thanks for the reply and info. I understand some of it but other parts I do not. I may end up having to pay someone to step me through each part so I know what to do in the future. All I have done with Apple is build a non-pay app and test on my device when testflightapp.com was up. I have not done anything since.

So I know how to build my app with a development profile. But I do not know what you mean by being prompted to login with a test account. I just looked on iTunes Connect and I see where I can add users on there but not sure if this is the same as test accounts. And I do not log into iTunes with my device that I know of so not sure about that and logging out.

One question… I understand about creating test accounts through iTunes Connect. But when do I log in with them for the purchase? If I have the in-app purchase code in my app and I am using my phone with the app and click to make the purchase on iOS does it prompt me to log in that account?

Go into settings and log out of your real account.  Run your app, login with your test account and you should be using the sandbox.

Rob

Which settings? On my iPhone?

Yes, iPhone “Settings” app.

Thanks, my 15 yr old son showed me this on his iPhone! lol

Hopefully last 2 questions. Can I basically use the code in the In-App Purchase project in the samples?

Never mind on the second, found the answer and edited this post.

Hopefully I should have this up and running soon. My iPad is completely dead and having to charge it all day to test with by tonight hopefully.

Warren

I tried working with the sample app and its too confusing. I’m going to post in the jobs to pay someone to modify the sample app for my app. If anyone wants to do this I have $100 to pay.

Warren

@Warren,

I answered you in another thread, but in case you look here. Please contact me here and I’ll give you some help:

rgemail2.png

There is “iTunes”, which is the program that runs on your computer to play music and download apps, access the store to buy stuff.  Then there is “iTunes Connect”, which is the developer portal where you go to setup your app, upload screenshots, write your apps name and description. This is where you setup in app purchases.

Rob

Thanks, I got connected to this and added my app. I then added the in-app purchase item. It says ready to submit. So can I test the in-app purchase now or do I have to submit my app to test? I just want to see the in-app work while testing before I deploy.

Thanks

Can this be tested through the simulator for either Android or iOS?

IAP and the .store() API can’t be tested in the simulator for any app store. They need to be built and tested on the device.

There is a sample app delivered with the simulator that shows how one would work with the store() API. There is also the below guide for IAP, and how to test it for the various app stores:

https://docs.coronalabs.com/daily/guide/monetization/IAP/index.html

Note that this is definitely not plug-and-play. It needs to be massaged to work with your own in-game store implementation, but it can be done. I feel like Android is much easier to test with at first, as it’s easier to build with the test item strings, but that’s just me.

Let us know how you get on and if you need any specific help!

Thanks for the info. So like I said I added the in-app purchase in iTunes Connect. Do I just deploy my app to a device to test to see if it works? Or do I need Apple to review my app first and then test?