I'm in IAP hell. Please help!

I have been banging on this for some time now. I finally took someone’s advice and am trying to get the sample code to work, but still to no avail. The code runs up to the point where store.purchase is called - I know that from print statements. I have to confirm that I want to buy the product and then it hangs and repeatedly asks me to input my Apple ID password alternating between an alert box message of Environment: sandbox cancel/continue. I finally get tired of this and cancel. When I start the app again, I can see that the transaction has failed with the error Cannot connect to iTunes store.

I think I have read every thread in the forum… the things I have checked already:

  • bank and tax info looks complete
  • developer vs distribution ad hoc provisioning profiles work the same
  • wiped my device - iPod
  • tried on a different device (another iPod)
  • have tried 3 different test users
  • my product id looks like com.companyname.appname.productid and the code matches exactly what i put into ITC
  • tried it in every app status - prepare for upload, waiting for upload, waiting for review, developer rejected
  • IAP product status in Ready to Submit

I followed Troy Bryants walkthrough (several times actually). The only part I do not get is #3 where he talks about editing the project’s .plist in Xcode. Does not seem to me like it applies to corona developers - does it?

My code is exactly the sample code with only the apple product list changed to match what I put in ITC.

Any help out there is hugely appreciated.

daf [import]uid: 58825 topic_id: 32117 reply_id: 332117[/import]

@dafwilli, wow, it sounds like you’ve tried everything. I wonder in what order of things you’ve tried them all… If I were you, I’ll try wiping the device one more time and install the version of your app that kept asking you your Apple ID repeatedly. Whenever some weird thing happen with mine, wiping the device works for me every single time.

  1. Wipe the device (and in the process, I sign in to the device using my Apple ID, which isn’t the test user Apple ID.)

  2. Once the device is ready to use, I sign out of App Store immediately.

  3. I install the app I want to test.

  4. Go to IAP screen and make a purchase.

  5. When asked, I enter my test user Apple ID.

This works every single time for me…

Naomi
[import]uid: 67217 topic_id: 32117 reply_id: 127942[/import]

One important thing you have to stick with, is that never sign in with your test account through /settings/appstore.

  1. Sign out of your real account through /settings/appstore

  2. When testing IAP - sign in with your test account ONLY within the app you are developing.

You can read about this at apples site, and if you sign in to your test account from /settings/appstore - you will run into problems. Theny you have to wipe your iOS install and start with a new fresh install on your device.

Joakim

[import]uid: 81188 topic_id: 32117 reply_id: 127963[/import]

@Naomi. Thanks. When you wipe the device do you use “Erase all content and Settings”?

daf [import]uid: 58825 topic_id: 32117 reply_id: 127974[/import]

@joakim. Thanks for that tip. I noticed that after the transaction fails and I go to settings/appstore, I am logged in as the test account user. Is that a problem? Do I need to wipe again?

daf [import]uid: 58825 topic_id: 32117 reply_id: 127975[/import]

No that shouldn’t be a problem. As long as you NEVER login with the test account within the settings of you iOS device.

Joakim [import]uid: 81188 topic_id: 32117 reply_id: 127977[/import]

@dafwilli, when I wipe my device, I do Settings > Reset > Erase All Content and Settings.

The key point is, as Joakim mentioned, sign in with your real Apple ID when resetting your device, but remember to sign out from App Store before launching your app you want to test. (Once you sign in using test user account from inside your app, you’ll see the test user signed in to app store outside your app too, but that’s okay.)

Naomi [import]uid: 67217 topic_id: 32117 reply_id: 127978[/import]

@dafwilli, wow, it sounds like you’ve tried everything. I wonder in what order of things you’ve tried them all… If I were you, I’ll try wiping the device one more time and install the version of your app that kept asking you your Apple ID repeatedly. Whenever some weird thing happen with mine, wiping the device works for me every single time.

  1. Wipe the device (and in the process, I sign in to the device using my Apple ID, which isn’t the test user Apple ID.)

  2. Once the device is ready to use, I sign out of App Store immediately.

  3. I install the app I want to test.

  4. Go to IAP screen and make a purchase.

  5. When asked, I enter my test user Apple ID.

This works every single time for me…

Naomi
[import]uid: 67217 topic_id: 32117 reply_id: 127942[/import]

One important thing you have to stick with, is that never sign in with your test account through /settings/appstore.

  1. Sign out of your real account through /settings/appstore

  2. When testing IAP - sign in with your test account ONLY within the app you are developing.

You can read about this at apples site, and if you sign in to your test account from /settings/appstore - you will run into problems. Theny you have to wipe your iOS install and start with a new fresh install on your device.

Joakim

[import]uid: 81188 topic_id: 32117 reply_id: 127963[/import]

@Naomi. Thanks. When you wipe the device do you use “Erase all content and Settings”?

daf [import]uid: 58825 topic_id: 32117 reply_id: 127974[/import]

@joakim. Thanks for that tip. I noticed that after the transaction fails and I go to settings/appstore, I am logged in as the test account user. Is that a problem? Do I need to wipe again?

daf [import]uid: 58825 topic_id: 32117 reply_id: 127975[/import]

No that shouldn’t be a problem. As long as you NEVER login with the test account within the settings of you iOS device.

Joakim [import]uid: 81188 topic_id: 32117 reply_id: 127977[/import]

@dafwilli, when I wipe my device, I do Settings > Reset > Erase All Content and Settings.

The key point is, as Joakim mentioned, sign in with your real Apple ID when resetting your device, but remember to sign out from App Store before launching your app you want to test. (Once you sign in using test user account from inside your app, you’ll see the test user signed in to app store outside your app too, but that’s okay.)

Naomi [import]uid: 67217 topic_id: 32117 reply_id: 127978[/import]

@naomi, @joakim,
I finally figured it out. My problem was logging in as the test user through the store. When you log in through the settings/appstore you are required to input more info like credit card info, etc. If you do that, the test user will not work. What a relief! Thanks so much for your help!
daf [import]uid: 58825 topic_id: 32117 reply_id: 128423[/import]

Glad to help :wink:

Joakim [import]uid: 81188 topic_id: 32117 reply_id: 128438[/import]

@naomi, @joakim,
I finally figured it out. My problem was logging in as the test user through the store. When you log in through the settings/appstore you are required to input more info like credit card info, etc. If you do that, the test user will not work. What a relief! Thanks so much for your help!
daf [import]uid: 58825 topic_id: 32117 reply_id: 128423[/import]

Glad to help :wink:

Joakim [import]uid: 81188 topic_id: 32117 reply_id: 128438[/import]