You only log into the test account from the device when your app runs and it calls store.init(). You do not have to upload and submit your app to test. It used to be that way, but Apple doesn’t want that any more. Have you submitted all of your InApp purchases for review?
I resolved the issue!! Thanks for the help! i used just de product id in Store.purchase and it resolved the issue!!
Just wanted to report back from having the same problem, and having read about as much as I could find here and on StackOverflow.
It seems that now (June 25, 2013), one cannot use Ad Hoc provisioning on Xcode for debugging on a device. Without an entitlements file, the app is downloaded to the device and fires up, but immediately fails with an error that “Failed to get the task for xxx for process nnn”. If one creates an entitlement file with “get-task-allowed” = true (Can be debugged = Yes), one gets the error message (something like) “Entitlements don’t match provisioning requirements” or something to that effect.
On the other hand, using Development provisioning is not a problem for debug testing sandboxed In-app purchasing.
Here are the things I did. Some certainly seem to be required changes, others I’m not as sure, since it worked only after several were implemented:
Contract and Banking info needs to be entered.
The product IDs must match exactly what is entered in iTunes connect. If you put XYZ123 in the iTunes Connect product ID, that’s what has to be used. For a “try anything” moment, the Corona sample code showing a product ID in the form “com.company.appname.productCode” threw me, thinking that I had to prepend the bundle identifier. If the product ID doesn’t match an active entry in the store, you’ll get a callback “failed” “unknown error”, “could not connect”, but no messagebox to that effect.
I linked my in-app purchases for submission with my app.
I uploaded my binary, then did a Developer Rejected.
I created a test user with a real email address so that I could confirm to iTunes Store that it was a valid ID. It seems critical that this test user NOT ever log in to the iTunes store manually–if one does this, the user is asked for credit card info. With credit card info, as soon as the user clicks Yes to purchase the product, the app switches to the iTunes store and finds themself cycling in an endless loop, asking for login. As soon as I created a test user with no credit card info, I was able to make test purchases.
Hope this helps someone!
-Tom
I’m basically having the exact same problem. I got my IAP test to work on hardware (yesterday morning) and now it isn’t working. My test cases do continue to work on the Xcode simulator. I’m baffled and not sure what to do? I just posted here about the issue: http://forums.coronalabs.com/topic/36802-iap-working-on-xcode-simulator-but-not-on-hardware/
May attempt what Naomi mentions regarding completely wiping the test device. @Naomi, did you have to keep wiping your device with many tests or was it a “once you wiped it, it was sorted” kind of situation?
To follow up on my post above this one, I too am just using the Product ID.
OK, the solution seems to be that rather than just dragging my app back into my Xcode organizer and choosing to “replace” the app, I need to first manually delete the app from the device, and then drag the app back into the organizer. This subtle difference has my IAP working on hardware again. Not sure why!.. but it’s working (for the time being lol)…
Just wanted to report back from having the same problem, and having read about as much as I could find here and on StackOverflow.
It seems that now (June 25, 2013), one cannot use Ad Hoc provisioning on Xcode for debugging on a device. Without an entitlements file, the app is downloaded to the device and fires up, but immediately fails with an error that “Failed to get the task for xxx for process nnn”. If one creates an entitlement file with “get-task-allowed” = true (Can be debugged = Yes), one gets the error message (something like) “Entitlements don’t match provisioning requirements” or something to that effect.
On the other hand, using Development provisioning is not a problem for debug testing sandboxed In-app purchasing.
Here are the things I did. Some certainly seem to be required changes, others I’m not as sure, since it worked only after several were implemented:
Contract and Banking info needs to be entered.
The product IDs must match exactly what is entered in iTunes connect. If you put XYZ123 in the iTunes Connect product ID, that’s what has to be used. For a “try anything” moment, the Corona sample code showing a product ID in the form “com.company.appname.productCode” threw me, thinking that I had to prepend the bundle identifier. If the product ID doesn’t match an active entry in the store, you’ll get a callback “failed” “unknown error”, “could not connect”, but no messagebox to that effect.
I linked my in-app purchases for submission with my app.
I uploaded my binary, then did a Developer Rejected.
I created a test user with a real email address so that I could confirm to iTunes Store that it was a valid ID. It seems critical that this test user NOT ever log in to the iTunes store manually–if one does this, the user is asked for credit card info. With credit card info, as soon as the user clicks Yes to purchase the product, the app switches to the iTunes store and finds themself cycling in an endless loop, asking for login. As soon as I created a test user with no credit card info, I was able to make test purchases.
Hope this helps someone!
-Tom
I’m basically having the exact same problem. I got my IAP test to work on hardware (yesterday morning) and now it isn’t working. My test cases do continue to work on the Xcode simulator. I’m baffled and not sure what to do? I just posted here about the issue: http://forums.coronalabs.com/topic/36802-iap-working-on-xcode-simulator-but-not-on-hardware/
May attempt what Naomi mentions regarding completely wiping the test device. @Naomi, did you have to keep wiping your device with many tests or was it a “once you wiped it, it was sorted” kind of situation?
To follow up on my post above this one, I too am just using the Product ID.
OK, the solution seems to be that rather than just dragging my app back into my Xcode organizer and choosing to “replace” the app, I need to first manually delete the app from the device, and then drag the app back into the organizer. This subtle difference has my IAP working on hardware again. Not sure why!.. but it’s working (for the time being lol)…