我将我的应用程序提交到苹果商店时遇到问题 . 他们似乎不希望我为应用内购买创建自动续订订阅 . 他们希望我创建一个非消费类应用内购买产品类型 . 这是整个消息:

Answer from Apple:

感谢您的重新提交 . 经过进一步审核,我们发现以下问题仍然存在:
准则3.1.2 - 业务 - 付款 - 订阅
您的应用内购买目前被标记为自动续订订阅 . 但是,使用非消费类应用程序内购买产品类型更合适,因为该产品用于解锁应用程序的功能 . 非耗材产品仅由用户购买一次,并且始终可在与该用户的iTunes帐户关联的所有设备上使用 . 自动续订订阅适用于期刊应用,例如杂志和报纸 .
下一步
创建应用内购买产品后,无法更改产品类型 . 因此,您需要使用正确的产品类型创建新的应用内购买产品 .
要创建新的应用内购买:

  • 登录iTunes Connect
  • 点击"My Apps"
  • 选择您的应用
  • 单击"Features"以创建新的应用内购买
  • 单击“保存”
  • 完成所有更改后,单击“应用程序版本信息”页面顶部的"Submit for Review"按钮 .
    当前产品将在iTunes Connect中显示为"Rejected" .
    资源
    详细了解如何在iTunes Connect开发人员帮助中提供应用内购买 .
    注意:提供必须可恢复的应用内购买产品的应用必须包含"Restore"功能 . 以下应用内购买类型必须是可恢复的:
  • 非消耗品
  • 自动续订订阅
  • 免费订阅
    有关详细信息,请参阅应用内购买编程指南中的“恢复购买的产品”部分 .

我不明白,因为他们说自动续订订阅适用于期刊应用程序,如杂志和报纸 . 但Deezer,Spotify,NetFlix,LinkedIn等...不是杂志和报纸,它们是自动的续订订阅 .

对于这种类型的订阅,我的代码可能不正确吗?如果是这样的话,这是我的代码:

- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions{
    for(SKPaymentTransaction *transaction in transactions){
        //if you have multiple in app purchases in your app,
        //you can get the product identifier of this transaction
        //by using transaction.payment.productIdentifier
        //
        //then, check the identifier against the product IDs
        //that you have defined to check which product the user
        //just purchased

        switch(transaction.transactionState){
            case SKPaymentTransactionStatePurchasing: NSLog(@"Transaction state -> Purchasing");
                //called when the user is in the process of purchasing, do not add any of your own code here.
                break;
            case SKPaymentTransactionStatePurchased:
                //this is called when the user has successfully purchased the package (Cha-Ching!)
                [self doMonthlySubscription]; //you can add your code for what you want to happen when the user buys the purchase here, for this tutorial we use Monthly Subscription
                [self viewDidAppear:NO];
                [[SKPaymentQueue defaultQueue] finishTransaction:transaction];
                NSLog(@"Transaction state -> Purchased");
                break;
            case SKPaymentTransactionStateRestored:
                NSLog(@"Transaction state -> Restored");
                //add the same code as you did from SKPaymentTransactionStatePurchased here
                [self doMonthlySubscription]; //you can add your code for what you want to happen when the user buys the purchase here, for this tutorial we use Monthly Subscription
                [self viewDidAppear:NO];
                [[SKPaymentQueue defaultQueue] finishTransaction:transaction];
                break;
            case SKPaymentTransactionStateFailed:
                //called when the transaction does not finish
                if(transaction.error.code == SKErrorPaymentCancelled){
                    NSLog(@"Transaction state -> Cancelled");
                    //the user cancelled the payment ;(
                }
                [[SKPaymentQueue defaultQueue] finishTransaction:transaction];
                break;
            case SKPaymentTransactionStateDeferred:
                NSLog(@"Deferred");
                break;
        }
    }
}

.

- (void)doMonthlySubscription{
        [self.view setBackgroundColor:[UIColor blueColor]];
        isMonthlySubscription = YES;
        //set the bool for whether or not they purchased it to YES, you could use your own boolean here, but you would have to declare it in your .h file

        [[NSUserDefaults standardUserDefaults] setBool:isMonthlySubscription forKey:@"isMonthlySubscription"];
        //use NSUserDefaults so that you can load wether or not they bought it
        [[NSUserDefaults standardUserDefaults] synchronize];
    }

我真的不明白是什么问题?

(我要打电话给他们,如果有更多信息,我会更新)