我正在使用以下代码进行收据验证。
NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];
NSData *receipt = [NSData dataWithContentsOfURL:receiptURL];
if (!receipt) {
/* No local receipt -- handle the error. */
}
/* ... Send the receipt data to your server ... */
当我在AppDelegate
中添加此代码时,默认情况下,当用户启动应用程序时,将调用appStoreReceiptURL调用并自动生成收据。我不想每次都收据。用户续订计划时,我需要该收据。任何人都知道这一点,请帮助我