MKStoreKit isFeaturePurchased报告不正确 [英] MKStoreKit isFeaturePurchased reporting incorrectly

查看:243
本文介绍了MKStoreKit isFeaturePurchased报告不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用MKStoreKit在我的应用程序中实现应用内购买。它的工作大部分,除了一件事,我不能弄清楚。我使用以下方法恢复交易。

I'm trying to use MKStoreKit to implement in-app purchases in an app of mine. It is working great for the most part, except for one thing that I can't figure out. I'm using the following method to restore transactions.

-(void)restoreToFullVersion:(UIViewController *)sender{
    [MBProgressHUD showHUDAddedTo:sender.view animated:TRUE];
    [[MKStoreManager sharedManager] restorePreviousTransactionsOnComplete:^{
        [MBProgressHUD hideHUDForView:sender.view animated:TRUE];
        [[NSNotificationCenter defaultCenter] postNotificationName:@"userDidUpgradeNotification" object:nil userInfo:nil];
        [self upgradeSuccessful];
    } onError:^(NSError *error) {
        [MBProgressHUD hideHUDForView:sender.view animated:TRUE];
    }];
}//end method



我已经记录完成块和上面的代码除了如果你然后调用

I have nslogged the completion block and the above code all works as expected except for if you then call

[MKStoreManager isFeaturePurchased:kMainNoncomsumable];

它返回false。我认为恢复过程完成后MKStoreManager应该返回true isFeaturePurchased或我缺少的东西吗?

it returns false. Am I correct in thinking that after the restore process has completed MKStoreManager should return true for isFeaturePurchased or am I missing something?

我只是实现一个非消耗性的应用程序购买并使用Cocoa-pods将MKStoreManager包含到我的项目中。

I am only implementing one non-consumable in-app purchase and included MKStoreManager into my project using Cocoa-pods.

似乎SO上的其他人都有相同的问题,但我还没有找到有效的解决方案。

It seems as if other people on SO are having the same problem, but I have not found a valid solution yet.

感谢您提供所有帮助!

推荐答案

它工作,并且只是为了万一任何人在未来有同样的问题,这里是我做的。我删除了应用程序内购买,并在iTunes Connect中创建了一个新的,重新安装MKStoreKit使用可可豆,重新输入应用程序内购买ID到MKStoreKit plist文件,并等待一天,现在一切都很好!

I got it working, and just in case anyone in the future is having the same problem, here is what I did. I deleted the in-app purchase and created a new one in iTunes Connect, reinstalled MKStoreKit using cocoa pods, re-entered the in-app purchase id into the MKStoreKit plist file, and waited a day and now everything is working just fine!

这篇关于MKStoreKit isFeaturePurchased报告不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆