10

I am implementing IAP in my iOS app, and I am using the latest version of SwiftyStoreKit Framework to help me with the purchases.

I have done all the pre cursor tasks such as setting up a developer account in itunes connect, generating provisiong profiles for the app, making new consumable and non consumable purchases in TestFlight, adding those purchases to the app information (ready to submit) and also creating a sandbox user. I have done debugging following this answer, this one and this one.

Now, the problem is that whenever I send a request to retrieve info about a product, I get the following error. RetrieveResults(retrievedProducts: Set([]), invalidProductIDs: Set(["com.mycompany.app.consumable"]), error: nil)

and when I try to purchase the product, I get this error Purchase Failed: SKError(_nsError: Error Domain=SKErrorDomain Code=3 "Invalid product id: com.mycompany.app.consumable" UserInfo={NSLocalizedDescription=Invalid product id: com.mycompany.app.consumable})

Restoring purchases and verifying receipts seem to work fine...

Any pointers would be very helpful.

Thank you.

UPDATE:

I have now left behind the SwiftyStoreKit framework and am using Apple's own way of using a SKProductsRequest, where I have setup the delegate functions and all the requirements and then I run the function call 'SKProductsRequest.start()' and it still gives me back a set of invalid product ids once again.

For the new method, I setup a new project, along with bundle ids provisioning profiles, and itunes connect app. I can upload the app to itunes connect for testflight too! So the ids seem to be correct.

Community
  • 1
  • 1
Munib
  • 827
  • 1
  • 12
  • 27
  • 1
    Is your app already in AppStore? Or just in developing? – LinShiwei Mar 07 '17 at 06:02
  • @LinShiwei it's currently being developed, not on the App Store. – Munib Mar 07 '17 at 15:13
  • Is the app's bundle id the same as that in iTunesconnect? – LinShiwei Mar 07 '17 at 15:30
  • @LinShiwei Yes it is. – Munib Mar 07 '17 at 21:01
  • your product id in your code and iTunes page seems not be same or your product id on app store does not follow com.mycompany.app.consumable pattern – dragoneye Mar 15 '17 at 10:57
  • @dragoneye They are the exact same, ive tried it both ways, with the pattern and without the pattern. Both of them don't seem to work. – Munib Mar 16 '17 at 01:36
  • another thing you can check your appid at iTunes store enabled in app purchase or your provisional profile enable in app purchase or section 3.2 is fulfilled in iTunes connect which is related to Agreements, Tax, and Banking – dragoneye Mar 16 '17 at 04:09
  • @dragoneye Yes, done that too. Essentially I have gone down the list posted in the blog linked above and have done every single thing so far... Im starting to think perhaps some firewall on my network is blocking it? – Munib Mar 16 '17 at 18:17

1 Answers1

0

Ok, after all this time I visited my old co-workers again and they told me that the admin had forgotten to accept the store agreements.

Even though I had specifically mentioned it as a possibility... but oh well. They were able to get purchases working again after that.

Munib
  • 827
  • 1
  • 12
  • 27