开发者

How to enable pro features in In-App purchase if purchase is successful

开发者 https://www.devze.com 2023-01-24 21:48 出处:网络
I am trying to implement the in-App purchase of non-consumable goods. I have implemented the sample code of TROY “In App Purchases: A Full Walkthrough” http://troybrant.net/blog/2010/01/in-app-purch

I am trying to implement the in-App purchase of non-consumable goods. I have implemented the sample code of TROY “In App Purchases: A Full Walkthrough” http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/.I am getting the product information from the server.I am also able to make the purchase that product.I am implementing this in sand box environment.I also get a call back whether the purchase is successful or not.

The problem i am facing is that when i debug the code , none of the methods in the InAppPurchaseManager are being invoked except - (void)requestProUpgradeProductData - (void)productsRequest:(开发者_开发知识库SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response

So i am not able to put the code in which i want to enable the pro features if the purchase is successful.

Thanks

Aditya


I experienced the same problem on my iPhone4. After searching for answers I decided to just go to SETTINGS to see what I needed to change. I clicked RESTRICTIONS and found that all restrictions were enabled. I DISABLED the restrictions [had to enter my passcode] and like magic, it worked! I was immediately able to make an in-app purchase. Hope this helps.


I got the solution to my problem

The -loadStore method has to be invoked right after invoking the -purchaseProUpgrade method is called from the class in which we are implementing th inApp purchase.

0

精彩评论

暂无评论...
验证码 换一张
取 消