Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - In-App Purchase - Invalid product Identifier

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))

    })
}
like image 880
Vaibhav Jhaveri Avatar asked Apr 10 '17 05:04

Vaibhav Jhaveri


1 Answers

I had the same exact problem, but the solutions above did not work for me.

This is what did:

It turns out I hadn't filled out the proper payments and W9 form on AppStoreConnect.

Go to AppStoreConnect > Agreements, Tax, and Banking...

Fill out the "Paid Apps" contract if it hadn't already been filled out

AppstoreConnect Contract

like image 125
Gabriel Pires Avatar answered Nov 04 '22 21:11

Gabriel Pires