in-app purchase problem

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
rdmiller
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 15
Joined: Thu Mar 29, 2012 10:46 am

in-app purchase problem

Post by rdmiller » Wed Apr 11, 2012 7:17 pm

I'm not having any luck getting in-app purchasing to work in my ios app.

The first call I make is:

mobilepurchasecreate "itemID"

This always returns "1", regardless of which itemID I use. This doesn't seem like a valid result. I've double-checked that the itemID is exactly the same as the one(s) submitted in iTunesConnect.

I am making sure the iphone on which I am doing the testing has been logged out (in Settings-->Store)

I am also logged out of iTunesConnect.

I've created a Test User account.

Any ideas?

Thanks.
Richard Miller

FireWorx
Posts: 362
Joined: Wed Sep 07, 2011 9:39 pm

Re: in-app purchase problem

Post by FireWorx » Mon Apr 16, 2012 7:15 pm

I am going to be doing some testing on this later tonight. Are you using the runrev.com lesson provided in the tutorials section? Did you work out the issue yet?
Dave

FireWorx
Posts: 362
Joined: Wed Sep 07, 2011 9:39 pm

Re: in-app purchase problem

Post by FireWorx » Tue Apr 17, 2012 3:51 am

Hi,
I am a little confused as to when and where this in app purchase testing can take place. I am prepping my iPad app for upload, I have added my screen shots, metadata, etc in iTunes Connect where my app is waiting for permission to upload.

Is there a way I can test the In Ap Purchase link or should I code the app with the code provided in the tutorial and just upload it for review?
Dave

rdmiller
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 15
Joined: Thu Mar 29, 2012 10:46 am

Re: in-app purchase problem

Post by rdmiller » Tue Apr 17, 2012 10:46 am

Yes, I did get it worked out. The issue I had was an unusual one, which had to do with filling out the Tax form area. Once done, the in-app purchase process worked great.

Be sure to set up a test user in iTunes.
Log out of the STORE on your device (in Settings), so that you can then log-in to the Store with the test user account.
Sign out of iTunes Connect.
Then just follow the runrev example. Works great.

FireWorx
Posts: 362
Joined: Wed Sep 07, 2011 9:39 pm

Re: in-app purchase problem

Post by FireWorx » Tue Apr 17, 2012 4:30 pm

Thanks,

This helps.
https://developer.apple.com/library/mac ... -CH103-SW1

Ok I set up a test user account. My application is in the "waiting for upload" state. I have an in App purchase attached to that app. I have an in app purchase id number. I have logged out of iTunes Connect. (I realize this will not work in the simulator.) I have logged out of the store on my iPad devise. Now working on the code aspect of it.

Now the example stack uses code mobilePurchaseCreate "com.runrev.purchasetest.nonconsumable"
am I to change that to mobilePurchaseCreate "com.myprefix.myApname.nonconsumable" ? or is it as in the documentation where the docs say: mobilePurchaseCreate productID With productID is "the identifier of the in -app purchase you created in iTunes Connect." They did ask me to type in a in-app product id number of which I selected something like FW34578
Which is it?
Will check back later.
Thanks Dave

FireWorx
Posts: 362
Joined: Wed Sep 07, 2011 9:39 pm

Re: in-app purchase problem

Post by FireWorx » Tue Apr 17, 2012 10:02 pm

Ok so the Id needs to be something very unique. Best to use the Id of com.mycompanyname.myApName but not absolutely necessary.
Last edited by FireWorx on Wed Apr 18, 2012 8:51 am, edited 1 time in total.

rdmiller
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 15
Joined: Thu Mar 29, 2012 10:46 am

Re: in-app purchase problem

Post by rdmiller » Wed Apr 18, 2012 12:56 am

This here: mobilePurchaseCreate "xxx"

The "xxx" can be any product identifier, but it must be PRECISELY the one you entered in iTunes Connect. See this for more:

http://stackoverflow.com/questions/3605 ... everse-dns

FireWorx
Posts: 362
Joined: Wed Sep 07, 2011 9:39 pm

Re: in-app purchase problem

Post by FireWorx » Wed Apr 18, 2012 2:52 am

Hee is all the information Apple doesn't bother to tell you.

http://troybrant.net/blog/2010/01/in-ap ... lkthrough/

Step 5. Add the App Binary

This detail is not mentioned anywhere in Apple’s documentation, but is a requirement nonetheless. You must submit a binary for your application in order to successfully test in-app purchases. Even if you aren’t 100% done, you need to submit a binary. However, you can immediately reject the binary so it won’t go through the review process.

This was the crucial step I missed that caused me hours of grief and frustration. Follow these steps to add the binary:

Yea Me Too. Apparently according to one source 55% of in app purchase requests in test mode are answered by the same warning I was getting IE "can not connect" Hope this helps someone! I will report back If i get it to work or not.
Dave

FireWorx
Posts: 362
Joined: Wed Sep 07, 2011 9:39 pm

Re: in-app purchase problem

Post by FireWorx » Wed Apr 18, 2012 6:33 am

Ok,
Troy's article is right on! Tells you step by step how to get it done. The big step I was missing and Apple and RunRev never spelled out is that you need to get your development profile in order and upload your App to iTunes Connect before you can test the In-App purchasing connect strings. Then you can immediately reject your own App while you work on getting the code right regarding the in-app purchasing. Once the code is A-Ok resubmit your App for review.

As soon as I did that It immediately made a connection to the iStore and asked me if I wanted to pay $24.99 for my app. Now I have to work out the kinks on unlocking the "deluxe" features of my AP.

Hope this thread saves someone else the 5 hour nightmare headache I went through.

Dave

Post Reply