In-App Purchase Setup. Please Help!

Hey guys,
I`m in the proccess of updating my app that is already live on the appstore. So am now, for the very first time, going to setup an in-app purchase for this app and will be delivering/submitting it already together the version updated of this same app for the store, got it?

OK, until this moment what I`ve done was:

  1. Setup an in-app purchase for the app that is live at iTunnes connect (under Manage your in-app purchase)

  2. I`m setting up right now a new user at iTC for the testing purposes required by the IAP proccess.

  3. Looking at this IAP setup, still into my itunnes connect account, I can see one link that says: View or generate a shared secret – what`s that? Do I need to check that out for some reason?

  4. I`ve setup and saved my IAP, for non-consumable item, set the price tier as well, BUT I did not upload any SCREENSHOT of this IAP as they ask, SO after all, the status of my in-app purchase setup is: Waiting for Screenshot together a small red ball. Do I need to send it by obligation to get it working? What would be this screenshot as my IAP regards only a new feature of my app where the user will be able to “save” his code or whatever into the app and its value is 99c only.
    So, after all I know I need to CODE it all yet in Corona, but getting some nice advice now about this setup with Apple first would help me along the way surely.
    Thanks,
    Rodrigo. [import]uid: 89165 topic_id: 24147 reply_id: 324147[/import]

Yes - create the shared secret

Send any screenshot of your app - later replace it with a screenshot of the IAP
…good luck with all the IAP hurdles :wink: [import]uid: 70114 topic_id: 24147 reply_id: 97500[/import]

@Sven.Lua - Mate, THANKS for that shot! :slight_smile:

So I`ll keep walking…

Btw, do you know where am going to use that thing?
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 24147 reply_id: 97514[/import]

What do I do now that I`ve created the shared secret, uploaded an “test” screenshot and also created the test user in iTC.

The status of my IAP at iTC right now is “waiting for sumbmission”. What does that mean? :\ Can I start to code the app to test it?

Am feeling lost.
Thanks guys,
Rodrigo. [import]uid: 89165 topic_id: 24147 reply_id: 97828[/import]

Hey, Rodrigo, my IAP doesn’t include subscriptions, so I don’t know what’s the best approach you can take. That said, you might want to read through some of the following (they helped a lot when I worked on IAP):

http://developer.anscamobile.com/reference/in-app-purchases

http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/

You might also want to check out the InAppPurchase sample code that comes with SDK:

SampleCode > Networking > InAppPurchase

Good luck!

Naomi

[import]uid: 67217 topic_id: 24147 reply_id: 97839[/import]

@Naomi, you`re awesome as usual! Thanks! :slight_smile:

By the way Ill follow those threads youve passed above BUT just to not misunderstand you, my IAP isnt about subscriptions. Its all about only one new feature that will be available in the app when someone buy it, got it? (and I`ve registered as a “non-consumable” item as well)

PS: If you are speaking about “subscriptions IAP” because of that “shared secret” as we told above, HONESTLY I do not know anything about that and also I just clicked that because @Sven said to do that to get it all working for testing purposes as well.

By all of this you can see HOW MUCH am lost at this. :frowning:
Thanks anyway,
Rodrigo.

EDIT: When I checked those links I realized that I`ve followed exactly all those steps as described there at the 2nd link by @Troy and so am stoped at the final of that. As I have the test user created and the IAP at iTunnes is just saying “Ready for submission” together a small yellow ball. :\

I am posting a small screenshot of the IAP status at iTC right now:
[import]uid: 89165 topic_id: 24147 reply_id: 97840[/import]

Hey, Rodrigo, yup. I have not set up shared secret, and I had to google it to find out what it was. If you are doing non-consumable item (and it has nothing to do with subscription), you don’t need it. I think you should start coding and see how things go. You might want to look at this code posted by d3mac123:

https://developer.anscamobile.com/forum/2011/10/13/app-purchases-help-needed#comment-60894

d3mac123’s code along with Corona’s sample code helped me sort out the IAP. When in doubt, make sure to use lots print statements and check to see how far your code executes.

Good luck!

Naomi

Edit: By the way, “ready to submit” should be fine when testing against the iTC’s sandbox. [import]uid: 67217 topic_id: 24147 reply_id: 97844[/import]

@WOW Naomi! What a great help! :slight_smile:

Thank you so much for taking your time trying to help me - at least I do not feel so AlonE! :stuck_out_tongue:

By the way was exactly it that I was hoping to listen - to try it out via coding already. So I`ll code it by now and see if after building the app I become able to see it working (hope so) or CAN I TEST IT using only the corona simulator? :\

PS: One more question in my mind is that: as this app am preparing the IAP is already live at appstore, so I`ve built it using the Distribution Certificate as its a must when ready to submit for appstore BUT now is my question: which profile would I use to build the app regarding the IAP testing? :\

PS2: About the “shared secret” Ive setup that one as Ive said above, but I do not think I`ll need to use that anywhere, at least concerning the non-consumable IAP am preparing right now, so thanks for Googling about it @Naomi.
One more time,
My sincere thanks,
Rodrigo.
[import]uid: 89165 topic_id: 24147 reply_id: 97849[/import]

Hey, Rodrigo, you can’t test IAP using simulator. You need to generate an AdHoc build (but in your case, who knows, distribution certificate may work – but I’d start with AdHoc version just to make sure), install it on a device, and use the test user to test it. Make sure to sign out of App Store before you launch your game on device to test it. (By the way, jail broken device can’t be used to test IAP.)

Good luck & good night.

Naomi [import]uid: 67217 topic_id: 24147 reply_id: 97853[/import]

@Naomi, OK, I got it! So I have to test on device, that`s ok.

About the Ad-hoc build, honestly I have no idea about that as also how to make one, as in my case I`ve always used the “Team Provisioning Profile” for everything else, only not the buid for AppStore. So would you know if I would test using the Team profile or I really HAVE TO MAKE an Ad-Hoc one? :\

PS: Regarding the Distribution profile/certificate I think that we cannot use that to “install” our app in our iDevices, only for AppStore, but I would be wrong.
Hey Naomi, thanks for the helpfull “chat” here. :slight_smile:
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 24147 reply_id: 97855[/import]

Rodrigo this post I made previously shows how to use a Distribution provisioning profile to build for your device; http://developer.anscamobile.com/forum/2012/01/10/ios-walkthrough-testing-device-0

You can install on your device using distribution if you have selected “Ad Hoc” rather than “App Store” when creating the profile.

I hope this helps, glad to see you moving along with Naomi’s wonderful assistance :slight_smile: [import]uid: 52491 topic_id: 24147 reply_id: 97861[/import]

Haha @Peach, youre right, @Naomi is a master one about IAP and youre awesome too! :slight_smile:

So thanks for the link BUT look, as I said this app is LIVE already and so it was built using the Distribution Profile/Certificate for STORE and not Ad Hoc because that time I was really building for release it for the jungle, SO would I test the IAP using the Team one? (I think I`ll try it out and report here for you gals). :frowning:

Time to start to write some code and so TRY to build it using the Team provisioning profile (for testing) and if I do not get it, Ill report here and ask some hand again. ;) Im very glad for all the nice help and info shared here. Thank you!
Rodrigo. [import]uid: 89165 topic_id: 24147 reply_id: 97867[/import]

I am not 100% certain (Naomi would know better than me) but perhaps the development one will work for testing; there is certainly no harm in trying and I’d like to hear results :slight_smile: [import]uid: 52491 topic_id: 24147 reply_id: 97917[/import]

Good morning, Rodrigo & Peach. About dev certificate, I could not get it to work. I always used AdHoc to test my game on device, but for some bizarre misunderstanding on my part, I tried using dev certificate to test IAP, and I’ve gotten error messages every single time, and good grief, the attempt to use dev certificate set me back a couple of weeks when working on IAP. It drove me near insane. As for the AdHoc certificate, I don’t think it’s all that hard to create (and I don’t think it would mess up your distribution certificate that you already have for your store release.)

As Peach mentioned, go to Apple dev center, sign in, go to Provisioning Portal, click on Provisioning, select Distribution, click on New Profile, choose AdHoc (not App Store), create profile name (such as MyGame AdHoc - so that you know this is AdHoc certificate of your specific app), select an App ID of the app you’ve already released, and select devices you want to install the AdHoc version of your app. The rest works the same as installing App Store version of the distribution certificate.

Naomi

[import]uid: 67217 topic_id: 24147 reply_id: 97999[/import]

Hey Rodrigo I just uploaded my game with IAP last night. I did the same as you, I had an app on the store already and added IAP to an existing app. Also wanna thank you Naomi, I read your posts in the other threads and it helped me. I heard so many horror stories but I did exactly what you did Rodrigo and did some research first and hey my IAP test worked on the first try!

Whenever I built to test I just used the same provisioning profile that I used to test before I had IAP. My iPhone is jailbroken so I can confirm that it doesn’t work on there, but I already read that going in so I just wanted to test that theory. IAP worked fine on my iPad which isn’t jailbroken.

When I uploaded my binary I kept it in “waiting for review” status to test. I read that if you do a developer rejected status you won’t be able to test.

Finally as Naomi said, go into your device settings and click on Store, then sign out. When you do your test you need to sign in using your test user.

My update is still waiting to be approved so I can’t comment any further. Good luck! [import]uid: 31262 topic_id: 24147 reply_id: 98036[/import]

@aaaron, great to hear things went very smoothly for you. Also good to know that team provisioning profile works with IAP testing (if that’s what you meant). And really nice to know that we can test IAP with the binary in “waiting for review” status.

Cheers,
Naomi

[import]uid: 67217 topic_id: 24147 reply_id: 98041[/import]

@Peach, @Naomi and @Aaaron - Guys/gals you`re ROCK! :slight_smile:

I am really glad of receiving all this amazing HELP from you all. :wink:

So, after read all the wonderful info shared by you above, I`ll so test it using the Team Provisioning Profile, because, just to note here, as @Aaaron have said, I always have used that kind of profile too for everything else, so I gonna try that out.

But @Aaaron said something that I really did not get yet:
When I uploaded my binary I kept it in “waiting for review” status to test. I read that if you do a developer rejected status you won’t be able to test.

So, what do you mean about “binary” Aaaron? Because as you know by now, my app is LIVE already and so the “binnary” (if am not misunderstanding you) is already online, no?! :S

Also, if you mean “upload binary” as being the part you send your updated app (with IAP already setup) for Apple to review it then I understand. Because the unique thing I can see into my Manage in App purchase is the “Ready to submmit” as I`ve posted above on the screenshot :\
Haha, am feeling lost again… :frowning:

Ahhh, and to be worse, I was thinking about it all, and I just thought:
"OK, after the user buy the IAP and get the new feature UNLOCKED into the app, WHAT would happen when he leave the app (close or whatever) and after start the app again? By now I think that he would get the app feature “LOCKED” again, no? SO, how do I do to let the app with the “feature unlocked” forever after the user buy it and close/start the app? WOW,my brain is smoking!

Thanks A LOT!
Rodrigo. [import]uid: 89165 topic_id: 24147 reply_id: 98089[/import]

Hey, Rodrigo, I haven’t done IAP testing on an app that’s already live, so someone else will need to help you out with how to handle binary and the testing process. FYI, however, I’ve been able to test the IAP with “developer rejected” status.

About the UNLOCKED vs LOCKED status after your user make the purchase, you’ll need to look into how to save the purchased status. @d3mac123 code that I linked to above shows where you may want to include the function savePurchase(product) – and inside the function you’d need to write up a code that would let your app know that the user has unlocked your app. By the way, the parameter “product” used for the function is an index (i.e., the number). If you have only one product, you probably don’t need the parameter (so, you’d write up a function savePaurchase() instead). If you have more than 1 product for sale, the number would correspond to the row where your product appears on iTC.

Good luck!

Naomi [import]uid: 67217 topic_id: 24147 reply_id: 98103[/import]

@Naomi, I wish all the best for you! Thanks a TON for being so “cristal clear”! Haha :slight_smile:

So, YES, I`ll have to write some code to “keep” the status of the IAP transaction and check this flag always when the user starts up the app, right? OK, one more thing to learn…WOW.

After all, its good to know youre able to test it even having the status of “developed rejected” BUT my problem is, WHERE do I need to upload something (.app) and also isn`t possible to test it just making a normal build here with corona, installing it on my phone and after trying to buy to see if it works? Why do I need to send it for Apple? :\
Sorry guys, am tired of be feeling I get nowhere, bah. :frowning:

PS: Its not about you all, looks like its me being very ignorant or blind at least.
Regards,
Rodrigo. [import]uid: 89165 topic_id: 24147 reply_id: 98138[/import]

Hey, Rodrigo, I know how frustrating this process can get. Believe me, I went near insane.

I think the binary needs to be there for testing against iTC sandbox. That said, since you already have your app live, you may be able to skip this uploading and rejecting part. If I were you, I’d try building the app using AdHoc certificate, install it on my device, and see if I can test IAP against the iTC sandbox. And if it doesn’t work, then I’d consider looking into what additional steps need to be taken for adding IAP to live app.

Anyhow, this thorough walk-through talks about adding binary and how to reject it (scroll down to section #5) – but, again, since you already have a live app, you may not need to go through this process (I’m just guessing though):

http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/

Good luck!

Naomi [import]uid: 67217 topic_id: 24147 reply_id: 98146[/import]