I am trying to integrate In-App Purchases in my project. I have used a third party library, SwiftyStoreKit
, as IAP helper.
I'm trying to fetch the information of my In-App products, but always get a response that Invalid Product Identifiers
All my agreements are in Effect (Paid and Free).
Also, My In-App Product status shows Waiting for Upload
. My App is yet to be release, so I'm testing it in Sandbox Mode.
Following in my code:
import UIKit
import StoreKit
import SwiftyStoreKit
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewDidAppear(_ _animated: Bool) {
super.viewDidAppear(_animated)
if dataModel.lists.count >= 2 {
getInfo()
}
}
func getInfo() {
NetworkActivityIndicatorManager.NetworkOperationStarted()
SwiftyStoreKit.retrieveProductsInfo([productIdentifier], completion: { result in
NetworkActivityIndicatorManager.networkOperationFinished()
self.showAlert(alert: self.alertForProductRetrievalInfo(result: result))
})
}
Check your productIdentifier
!
It should be the same string as registered in iTunes Connect.
E.g "com.myapp.myPurchase"