Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
iOS IAP annoyed bug — Gideros Forum

iOS IAP annoyed bug

RickyngkRickyngk Member
edited February 2014 in General questions
Hi,

Every time I test my app with in sandbox mode, it always ask me to login with sandbox account "test2@guava7.com" (one of my test accounts), but never success. So, I have to press cancel to continue.

When I purchase an item, it says "you have already purchased this in app purchase but it hasn't been downloaded" and ask password again (and never success too).

Have you got this issue before ?

Comments

  • I've tried recently to set up a test account and had a similar issues. Currently have no idea how to make it work, and gave up for now :(
  • While many technologies from Apple work like a dream, IAP is one of those dreams that you'd rather not have.

    Likes: SinisterSoft

    twitter: @ozapps | http://www.oz-apps.com | http://howto.oz-apps.com | http://reviewme.oz-apps.com
    Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
    Cool Vizify Profile at https://www.vizify.com/oz-apps
    +1 -1 (+1 / -0 )Share on Facebook
  • Been having the same problem myself... no answer yet. I note some discussion that the "paymentQueue" still has things in it, and that "finishTransaction" MUST be called at the conclusion of a purchase to clear the payment queue... if you don't then the "you have already purchased this in app purchase but it hasn't been downloaded" will be the futile result (futile, because it then doesn't let you do anything with it).

    Trouble is, as I think happened to me, I started a transaction and my beautifully written Gideros code crashed before the "finishTransaction" ever got called. Okay, it wasn't THAT beautifully written!

    In the Xcode world they discuss ways of accessing the purchaseQueue to clear it, but I'm not sure how to do this from within Gideros. Perhaps one of you will have an idea. Here's a link to some Applese/Xcode stuff that may be relevant:

    (Can't post a link, this came from StackOverflow: how-to-start-a-download-upon-this-storekit-message )

    QUOTE:
    You have some unfinished transactions in the payment queue. To finish them check the paymentQueue.transactions array right after adding your observer with addTransactionObserver: method. If it contains some transactions handle them the way you do in your paymentQueue:updatedTransactions: method. If you don't, paymentQueue:updatedTransactions: is not called for them because they were already in the queue when you have registered the observer.

    By the way, make sure you call finishTransaction: for all of your transactions even if they have failed. Otherwise they will stay in the payment queue and cause this issue.
    ENDQUOTE
  • SinisterSoftSinisterSoft Maintainer
    Nice find. :)

    Is this the Labs IAP system you mean?
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • SinisterSoftSinisterSoft Maintainer
    edited May 2014
    @Rickyngk To get the login to work you have to logout of the settings > itunes. Then login when the app prompts you too, using the test account (not your real account).

    I call the isavailable in a way the the event then calls the purchase - it seems like it's the isAvailable that does the login. You don't want to call the isavailable without doing a purchase as they will have to login twice/they might not be logged in later when they want to make the purchase.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • adityaaditya Member
    Anyone has a fix for this problem posted by @Rickyngk?
    Loon Games LinkedIn Facebook Twitter - "Something bit me, gaah!"
  • SinisterSoftSinisterSoft Maintainer
    I think it's because he might be calling isAvailable and a maybe a restore when he starts the app - this should only be called on a button press.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
Sign In or Register to comment.