jinSasaki / InAppPurchase

A Simple and Lightweight framework for In App Purchase (Store Kit 1)
MIT License
288 stars 30 forks source link

fetchProduct Error #9

Closed bloodmajik closed 5 years ago

bloodmajik commented 6 years ago

Here is my purchase button, first I attempt to see if my IAP is reachable. it's not!

@IBAction func purchase(_ sender: Any) {
        let iap = InAppPurchase.default
        iap.fetchProduct(productIdentifiers: ["AppUnlock"], handler: { (result) in
            switch result {
            case .success(let products):
                print("ok")
            // Use products
            case .failure(let error):
                print(error)
                // Handle `InAppPurchase.Error`

            }
        })
    }

Here is my IAP in iTunes Connect.

image

I receive the error:

invalid(["AppUnlock"])

....

What's going on here?

jinSasaki commented 6 years ago

@bloodmajik Hi. Thank you for use InAppPurchase.

The invalid product id error is sent by StoreKit (AppStore). I think your IAP item setting is not completed.

Please check this post. http://troybrant.net/blog/2010/01/invalid-product-ids/

My first app that implemented IAP occurred the same situation. It was caused by missing bank details. :)

bloodmajik commented 6 years ago

Does this mean I need my app submitted to testflight to try out my IAP? Can I not just do it from the device im testing on from xCode?

On Sun, Jan 14, 2018 at 6:15 PM, Jin Sasaki notifications@github.com wrote:

@bloodmajik https://github.com/bloodmajik Hi. Thank you for use InAppPurchase.

The invalid product id error is sent by StoreKit (AppStore). I think your IAP item setting is not completed.

Please check this post. http://troybrant.net/blog/2010/01/invalid-product-ids/

My first app that implemented IAP occurred the same situation. It was caused by missing bank details. :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jinSasaki/InAppPurchase/issues/9#issuecomment-357566159, or mute the thread https://github.com/notifications/unsubscribe-auth/AfF5iutgNfV-LgI5JewihAItzNP2YJsPks5tKrTRgaJpZM4RdqE6 .

jinSasaki commented 6 years ago

@bloodmajik A new IAP item is required review by Apple. You need to submit the IAP item with app binary. But, I'm sorry, I don't know your IAP item status. If you need more details, please read Apple's document or contact to Apple. :)

jinSasaki commented 5 years ago

It seems to me that it was resolved because there is no reply. I close this issue. Please reopen or create new issues if you have problems. Thanks! 😄