Open minhit1805 opened 9 years ago
Having same issue after upgrading to unity 5.0.0f4 on iOS. Everything worked perfectly in Unity 4.6x. After upgrade, I get "purchase succeeded" log without the actual sku string attached. The sku string gets lost after calling
public void PurchaseCoins(){ _processingPayment = true; OpenIAB.purchaseProduct(SKU_BUYCOINS); }
I've been using open IAB for a over a year now and want to continue using it, but I can't find where the problem is here.
I've updated to the latest OpenIAB package as well with no luck. I hope someone has a resolution for this.
rolling back to openIAB 0.9.7.2 resolves my issue and gets everything working again. Do I have to rewrite my code in order to update my openIAB package or could this be a bug?
// create item; const string noads_item = "noads_item_tt";
//call init OPENIAB for IOS ; void Start () { Debug.Log ("init shop");
OpenIAB.mapSku (noads_item, OpenIAB_iOS.STORE, noads_item);
// Transmit options and start the service OpenIAB.init (options); }
private void purchaseSucceededEvent(Purchase purchase) { Debug.Log("purchaseSucceededEvent: " + purchase); // _label = "PURCHASED:" + purchase.ToString(); switch (purchase.Sku) { // control product and price here; case noads_item: { //GameObject endIAP; //endIAP=GameObject.Find("StoreController"); //Destroy(endIAP); PlayerPrefs.SetInt("isnoadsdata",1); } break; default: Debug.LogWarning ("UnknownSKU: " + purchase); break; } }
On another class i call OpenIAB.purchaseProduct ("noads_item_tt"); what i was wrong here? can i pass this warning and build nomal on IOS?