Quantcast
Channel: Questions in topic: "storekit"
Viewing all articles
Browse latest Browse all 89

Step by step using Prime31 StoreKit In Apps Purchase

$
0
0
Hi there ! I'm still bit confused how to use StoreKit In Apps Purchase from Prime31.. I made simple project before I was ready to make the actual project and then I have registered my product with following id : 1. Product ID : Get100Coin 2. Product ID : Get200Coin And I wrote the following code for retrieve my product from itunes using UnityEngine; using System.Collections; public class IAPS : MonoBehaviour { public static int Coin = 0; string[] coin100 = {"G","e","t","1","0","0","C","o","i","n"}; string[] coin200 = {"G","e","t","2","0","0","C","o","i","n"}; void Start () { } // Update is called once per frame void Update () { } void OnGUI() { if(GUI.Button(new Rect(70, 70, 100, 30), "Buy 100 Coin")) { #if UNITY_IPHONE if(StoreKitBinding.canMakePayments() == true) { StoreKitBinding.requestProductData(coin100); StoreKitBinding.purchaseProduct("Get100Coin", 1); GUI.Label(new Rect(150, 70, 1000,30), "Congratulation! You Have additional 100 Coin !"); Coin+=100; } #endif } if(GUI.Button(new Rect(70, 140, 100, 30), "Buy 200 Coin")) { #if UNITY_IPHONE if(StoreKitBinding.canMakePayments() == true) { StoreKitBinding.requestProductData(coin200); StoreKitBinding.purchaseProduct("Get200Coin", 1); GUI.Label(new Rect(150, 140, 1000,30), "Congratulation! You Have additional 200 Coin !"); Coin+=200; } #endif } GUI.Label(new Rect(70, 210, 1000,30), "Test :" +Coin); } } Before I run the application I was log out from my device account but when I run the application and press a button, a dialog doesn't appears that ask me to enter the itunes connect ID. Can someone help me step by step using Prime31 StoreKit Plugin? Thanks for your response !

Viewing all articles
Browse latest Browse all 89

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>