Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
iTunes Reject - Cannot connect to iTunes Store — Gideros Forum

iTunes Reject - Cannot connect to iTunes Store

adityaaditya Member
edited June 2014 in General questions
Reason:
Error occurred
Cannot connect to iTunes Store

From apple:
1. Launch the app
2. Tap on 'Shop'
3. Tap on one of the In-App Purchase products
4. Confirm the purchase of the item
5. An error message is displayed before the purchase completes
6 Unable to purchase Coins

We checked and it works using the test account but from any other account it pops the above message. Would appreciate advice.

[Edit]: Getting this. Do not understand the 2 popups, since storekit:purchase is called only once (verified).
Step 1: Clicked on buy, popup says 'Confirm your in-app purchase'
Step2: Click buy (shows two popups one after another)
Popup 1: You've already purchased this In-App Purchase but it hasn't been downloaded
Popup 2: Sign in to iTunes Store

The app has consumable in-app purchases.

Likes: unlying

Loon Games LinkedIn Facebook Twitter - "Something bit me, gaah!"
+1 -1 (+1 / -0 )Share on Facebook

Comments

  • unlyingunlying Guru
    edited June 2014
    Same

    We found that your app exhibited one or more bugs, when reviewed on iPad running iOS 7.1.1 and iPhone 5s running iOS 7.1.1, on both Wi-Fi and cellular networks, which is not in compliance with the App Store Review Guidelines.

    We received error message when completing the In App Purchase.

    For discrete code-level questions, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:

    - complete details of your rejection issue(s)
    - screenshots
    - steps to reproduce the issue(s)
    - symbolicated crash logs - if your issue results in a crash log

    If you have difficulty reproducing a reported issue, please try testing the workflow as described in Technical Q&A QA1764: How to reproduce a crash or bug that only App Review or users are seeing.
    Screenshot_0.png
    1536 x 2048 - 839K
  • adityaaditya Member
    edited June 2014
    Consumable Purchase Flow in the app:

    1) Call storekit:purchase with 'productIdentifier' and quantity as 1.
    2) Listen to StoreKit.PURCHASED callback, increment variable and save to '|D|'.

    Problem?

    @unlying: Yup, got the exact same screenshot from apple.
    Loon Games LinkedIn Facebook Twitter - "Something bit me, gaah!"
  • @Aditya,
    Given that WWDC is starting, apple generally could take down the apple store and some other services to upgrade, check if this is a one time thing or a regular error.
    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
  • adityaaditya Member
    Regular error. It was working before.
    Loon Games LinkedIn Facebook Twitter - "Something bit me, gaah!"
  • unlyingunlying Guru
    edited June 2014
    Did you solve it?
  • adityaaditya Member
    edited June 2014
    Nope. Still getting it. It's not consistent so still trying to drill down to the fundamental problem. Getting any of these randomly:

    1) 'Cannot connect to itunes'

    2) 'You have already purchased this in-app purchase but it hasn't been downloaded.': This happens if finishTransaction is not called after the purchase. Btw, would you happen to know a way to reset the transaction queue here? Cannot test after code change since it's already queued.

    3) The proper dialog and perfectly working transaction, the payment goes through successfully on the test account.
    Loon Games LinkedIn Facebook Twitter - "Something bit me, gaah!"
  • ar2rsawseenar2rsawseen Maintainer
    Oh Apple, Apple, Apple

    I think Guava7 had a problem that after publishing app update same error was, and it went away after a day of publish, which was deemed due to server propogation, etc.

    I seem to have random Cannot connect issues but only on my test account. But honestly, test accounts were hardly ever working correctly for me.

    I think @SinisterSoft was the last that I know to recently successfully publish app with IAP, maybe he can shed a light on what's the secret behind it

    The most interesting part is that it works sometimes, so all settings on the apple part are probably ok.

    :-?
  • adityaaditya Member
    If we use a non test account, it just pops 'cannot connect to itunes store' every time. The purchase transaction goes through sometimes on a test account.
    Loon Games LinkedIn Facebook Twitter - "Something bit me, gaah!"
  • This app was published yesterday https://itunes.apple.com/app/id879914445. It has in-apps. Same day previous app was rejected with "cannot connect to itunes". There is no difference between them about in-apps part.
  • SinisterSoftSinisterSoft Maintainer
    I don't know what I'm doing differently, I had a bit of bickering with apple over all this - once they were even testing a previous version and failed it for something that the new version had specifically fixed! Check the version no they test to see if they have done the same to you.

    First i include iab, then do the IAB.detectStores(), etc...

    I then set the products and the consumables. I setup an event listener for purchase complete, error, restore.

    In the available I check a global called 'iabAction', if it is "" then I do an iab:restore(), else I do an iab:purchase(iabAction).

    I don't call iab:isAvailable until needed as it somehow forces a login early and Apple seem to frown on this.

    When someone buys something, eg: 'half_wait', I do this:

    iabAction="half_wait"
    iab:isAvailable()

    The iab:purchaseComplete event will be called (or error if something went wrong), I then process what happens on purchase there. This also incidently (I don't know if this is by design) gets called on a restore btw, so only one set of processing to do.

    For the restore button I call:
    iabAction=""
    iab:isAvailable()

    I get an iab:restore event, which I flag, then the purchase events in which I restore the purchases - like they had just bought them.

    That's it - it seems to work ok on ios, google and amazon stores. Not tried it on Ouya.

    Hope this helps.
    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
    edited June 2014
    Working code for iOS purchases in case anyone reads this in the future. You need to create purchases on itunes connect like com.company.productname_1, com.company.productname_2, then enter the index i.e.1,2 etc in the textinputdialog.
    require "storekit"
     
    function onTransaction(event)
    	if event.transaction.state == StoreKit.FAILED then
    		AlertDialog.new("Error occured", event.errorDescription, "Ok"):show()
    	elseif event.transaction.state == StoreKit.PURCHASED then
    		AlertDialog.new("Purchase Completed", "Purchase successfully completed", "Ok"):show()
    	end
     
    	storekit:finishTransaction(event.transaction)
    end
     
    storekit:addEventListener(Event.TRANSACTION, onTransaction)
     
    local textInputDialog = TextInputDialog.new("Test Purchases", "com.company.productid[index]. Enter index number below.", "1", "Cancel", "OK")
     
    local comName = "com.company.productname_"	--Will concatenate indexes to become productname_1,productname_2 etc
     
    local function onComplete(event)
    	local pIndex = event.text
    	local productId = comName .. "_" .. pIndex
     
    	print("printing productId: " .. productId)
     
    	storekit:purchase(productId, 1)
    end
     
    textInputDialog:addEventListener(Event.COMPLETE, onComplete)
     
     
    function onMouseDown(event)
    	textInputDialog:show()
    end
    stage:addEventListener(Event.MOUSE_DOWN, onMouseDown)
    Loon Games LinkedIn Facebook Twitter - "Something bit me, gaah!"
Sign In or Register to comment.