可以验证沙盒中的自动续订订阅,但不能验证TestFlight

时间:2019-06-03 00:28:24

标签: objective-c testflight appstore-sandbox rmstore

我是iOS开发的新手,并且不时从事旧的Objective-C项目。它具有自动更新的订阅购买和还原/验证订阅,在沙盒中(XCode 10.2.1,iOS 12.3.1,但与以前的iOS 12更新相同)可以正常工作。但是在TestFlight中,我可以购买订阅,但是我无法验证自动续订的订阅收据。它永远不会在Testflight中找到订阅,尽管如果我再次尝试购买,它表示我已经订阅了。

如果您熟悉的话,我使用的是旧的RMStore Cocoapod例程,但是同样,它在Sandbox中效果很好:

RMAppReceipt *appReceipt = [RMAppReceipt bundleReceipt];  
if (appReceipt) {
    isActive =  [appReceipt containsActiveAutoRenewableSubscriptionOfProductIdentifier:@"0001" 
    forDate:[NSDate date]];
}
if (isActive) {
    NSLog(@"PatronSignupViewController: Got a list of subscriptions, a subscription IS active! Restored!");
} else { //if receipt does not contain an active subscription
    NSLog(@"PatronSignupViewController: Got a list of purchases, but Subscription NOT active!");

沙箱和TestFlight之间是否存在更改,以防止此类例程验证订阅?

0 个答案:

没有答案