1

It has been a long time chasing the problem within my in-app purchase trials yet I can not seem to solve this issue.My product identifier keeps returning as "invalid product identifier". Hopefully someone will point it out.

@IBAction func btnRemoveAdsAction() {

    NetworkActivityIndicatorManager.NetworkOperationStarted()
    SwiftyStoreKit.purchaseProduct("ProductID", completion: {
        result in
        NetworkActivityIndicatorManager.networkOperationFinished()

            if product.needsFinishTransaction {
                SwiftyStoreKit.finishTransaction(product.transaction)
            }
            self.showAlert(alert: self.alertForPurchaseResult(result: result))
        }
    })

}

when press on button click and execute above code that will return in completion of method with "result" are always return error("invalid product identifier") and exist from the method.

Mak K
  • 83
  • 1
  • 10
  • Have you entered correct ProductID ? – Jack Jul 14 '18 at 11:51
  • Possible duplicate of [iPhone StoreKit - invalid product id's](https://stackoverflow.com/questions/1041656/iphone-storekit-invalid-product-ids) – Lalo Mrtnz Jul 14 '18 at 17:39
  • what is ProductID ? you need to create identifire for inapp Purchase in itunes connect under your application first and you need to use that instead of ProductID. please search proper tutorial. – Hardik Thakkar Jul 16 '18 at 04:37
  • Yes, I enter correct id but still issue – Mak K Jul 16 '18 at 08:30

1 Answers1

4
  1. Your productID should look more like com.myappname.funnygame.100coins. Just mentioning to be sure this is 100% setup as in iTunes connect.
  2. Complete your agreement for paid apps in iTunes connect 'Agreements, Tax and Banking' tab. Without it you will receive 'invalid product identifier' every time.

Screenshot of Agreements, Tax and Banking in iTunes connect.

S. Gissel
  • 1,788
  • 2
  • 15
  • 32