1

func paymentQueue(queue: SKPaymentQueue!, updatedTransactions transactions: [AnyObject]!)

delegate method delivers "Cannot connect to iTunes Store" error. Why? I try to set up In-App purchase. Anything wrong in iTunes Connect setting? I am following this tutorial.

I am testing on real device. I get the error message before blue popup to authenticate myself as testuser.

I might have problem with my profession profiles? To distribution profile no devices is attached?

enter image description here enter image description here

János
  • 32,867
  • 38
  • 193
  • 353
  • What are you testing this on? In-App purchases can only be tested on a real device and not the simulator. – ZeMoon Oct 30 '14 at 12:59
  • This might help: http://stackoverflow.com/questions/7402801/cannot-connect-to-itunes-store-in-app-purchase-problem – ZeMoon Oct 30 '14 at 13:01
  • Also, you need a to be using a test Apple ID, which can be created in iTunesConnect – ZeMoon Oct 30 '14 at 13:02
  • okay... There are a lot of reasons for this to happen, and this problem is quite common as well. I'm pretty sure if you look around the various answers in SO you should find what is wrong. – ZeMoon Oct 30 '14 at 13:20
  • When did you create the product? Have you regenerated and replaced the provisioning profile after enabling in-app purchase in the developer portal? – ZeMoon Oct 30 '14 at 13:22
  • I have done a lot of stuff, recreating project in an other name etc., publish, but only **before** enabling in-app purchase – János Oct 30 '14 at 13:29
  • Well, you are supposed to generate new provisioning profiles for the application after you have enabled in-app purchase for a particular app ID. Sync XCode with your developer account and then confirm whether the fresh profile is associated with your application. – ZeMoon Oct 30 '14 at 13:35
  • I noted that 0 devices is assigned to Distribution Provision profile, can it be the reason? – János Oct 30 '14 at 13:45
  • No, this has nothing to do with your distribution profile. While in development (and testing in-app purchase) the development profile is all that matters. Download the development profile, and double-click on it. Attach it to your app, then Clean and Rebuild the application. – ZeMoon Oct 30 '14 at 13:52

2 Answers2

0

Sign out in App Store and try the In-App purchase again. Then try with test user.

János
  • 32,867
  • 38
  • 193
  • 353
0

You cant test IAP with your real account. First you must sign out and sign in with test account that you create in itunnes (sandbox).

Done
  • 1,088
  • 2
  • 11
  • 19