In our app, since we're going to provide auto-renewable subscriptions as our only type of IAP, we're planning to implement the Restore function by refreshing the receipt, and performing our usual process of validating it server side - same as we would be done for an initial purchase.If the user restores purchases (made on device A) using this method on a brand new device B (as opposed to restoring completed transactions), will future transactions (renewals, etc), arrive on the the payment queue on device B?
Search results for
restore purchases
21,818 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,I am using in app purchase in the Cosmic Insight app for following subscription types for 1 month, 6month, Yearly & Life time. But i am facing issue like Life time subscription restore purchase not working in the App Store build but working fine in test flight build. Apart from Life time, other subscription are working fine without any issues.I had created following type of in app purchases for corresponding bundle, could you please help us to find this is the right way to do it?In App purchase Type Auto-Renewable Subscription - for 1 month, 6month, Yearly Non-Renewing Subscription - for Lifetime Shall I create as a Non-Consumable for Lifetime? but if we create means existing lifetime download user want to buy again because we want create new bundle. Please suggest us resolve this issue.
Hello, Environment macOS Catalina 10.15.6 Xcode 11.6, Xcode 12 beta 6 App Sandbox Problem: A call to SKPaymentQueue.default().restoreCompletedTransactions() suddenly stopped calling paymentQueue(:updatedTransactions:) and directly invokes paymentQueueRestoreCompletedTransactionsFinished(:) I have an unreleased Mac app with a few non-consumables, and one of the IAP has Apple hosted content. Until a few days ago, both the in-app purchases & restore purchases were working fine, paymentQueue(:updatedTransactions:) was called during purchase and as well as restore flow, and the content was successfully downloaded. With no code changes to StoreKit flow, the restore purchases stopped working and paymentQueue(:updatedTransactions:) is no longer called. Now, it goes straight to paymentQueueRestoreCompletedTransactionsFinished(_:). func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue) { if (queue.transactions.count == 0) { #if DEBUG print (zero restore
I am actully working on Subscriptions(Auto Renewal), I have one doubt regarding the Restore Purchase button is it mandatory to provide Restore Option in case of auto renewal.Refering this link , As per the below document its not required.https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Products.html
Hello,my problem is, if I click on the button to restore the purchases, the app is pretended that there is an in-app purchase and it appears at the same time the message that you should buy and confirm with the fingerprint.But it can not be restored to a purchase because it was never bought ... I do not know where my mistake lies.If I try out the app with sandbox tester he shows me that I have already bought a subscription 20 times (should not be possible) ...my code:override func viewDidLoad() { .... .... if(SKPaymentQueue.canMakePayments()) { print(IAP is enabled, loading) let productID: NSSet = NSSet(objects: com.SubMonth, com.SubYear) let request: SKProductsRequest = SKProductsRequest(productIdentifiers: productID as! Set<String>) request.delegate = self request.start() } else { print(please enable IAPS) } } @IBAction func subscribeMonth(_ sender: Any) { for product in list { let prodID = product.productIdentifier if(prodID == com.SubMonth) { p = product
Something has broken when doing a non-consumable in-app purchase in iOS16 when compiling with Xcode 14.0.1. The exact same code worked fine in previous versions, but I cannot determine the cause of this new strangeness. The symptom is that the purchase of our app cannot be restored in any way. This problem seems to be only with the actual App Store. Restoring purchases works perfectly on iOS 15.7 and 16.0.2 when testing either in a sandbox environment or the new Xcode environment, but when dealing with the actual App Store, no dice. The result with the App Store is that there is no response whatsoever after initiating SKPaymentQueue.default().restoreCompletedTransactions(). The transaction.transactionState function never returns anything at all, not even a .failed. If I try and re-purchase the app, then transaction.transactionState immediately returns a .purchasing value, but then nothing completes from there. So there appears to be no way to restore
With a Sandbox account restore purchases is not working. It seems the sandbox tries to connect to mzstorekit-sb.itunes.apple.com but the server identifies itself with a wrong certificate. Normale purchases are working with the Sandbox-Account, but restore not. It fails with the following message: Restoring of transactions failed: Error Domain=NSURLErrorDomain Code=-1202 The certificate for this server is invalid. You might be connecting to a server that is pretending to be “mzstorekit-sb.itunes.apple.com”, which could put your confidential information at risk. UserInfo={NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “mzstorekit-sb.itunes.apple.com”, which could put your confidential information at risk., NSUnderlyingError=0x282aeaac0 {Error Domain=kCFErrorDomainCFNetwork Code=-1202 (null) UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust_desc=<SecTrustRef
On Validating Receipts Locally page we can see the following text:When an application is installed from the App Store, it contains an application receipt that is cryptographically signed, ensuring that only Apple can create valid receipts.Also inthis post two people pointed out that a receipt is provided on an install.So, why do we need Restore purchases button? On SKReceiptRefreshRequest page we can see the following text:The SKReceiptRefreshRequest class allows an app to refresh its receipt. With this API, the app can request a new receipt if the receipt is invalid or missing.So we need this button to refresh app receipt? Is it provided on install or not? Why should it be missing or invalid after install on new device? Hackers can modify app receipt, of course, but we can validate it with App Store and then fire SKReceiptRefreshRequest in case it's invalid or missing. Do we really need to provide Restore purchases button to end user?
Will users be able to restore purchases for an auto-renewing subscription for an app that has been 'developer removed from sale'?Many thanksDonal.
Hey guys,with ios9 Beta i ca not restore my purchases in a newsstand App. I have no idea why? Reinstalling doesn't work. Do you have any ideas or the Same problem?
I have a macOS app with auto-renewable subscription. I'm reading the docs and cannot fully understand the concept. According to the docs I have to add and observer to the payment queue. I have to provide a restore function to restore a purchase if the app was reinstalled. My observer is listening to the queue and it gets restored transactions once I call SKPaymentQueue.default().restoreCompletedTransactions() method. However, I cannot see if the subscription expired or not just using the observer. Transaction objects which I reecive in the payment queue have only some abstract transaction ID.The docs recommend to validate a receipt. I'm sending base64 encoded receipt to my server which in turns sends it to verifyReceipt endpoint. Even if I send an old receipt, Apple responds with JSON containing latest_receipt_info where I can see the current status of subscription and it's expiration date. I can assume that subscription is not active if expiration date is earlier than the
Hi everyone,I have 1 product as IAP Non-consumable item in my APP, I have implement the restore purchase button into my app. However any user click that button get the item successfully purchased. I'm not sure what's wrong. Below in my code:@IBAction func btn_restore(_ sender: Any) { SKPaymentQueue.default().add(self) SKPaymentQueue.default().restoreCompletedTransactions() }func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue) { for transaction in queue.transactions { let t: SKPaymentTransaction = transaction let prodID = t.payment.productIdentifier as String switch prodID { case No_Ads_ID: print(remove ads) remove_ads_purchased = true UserDefaults.standard.set(remove_ads_purchased, forKey: remove_ads_purchased) UIAlertView(title: Title, message: You've successfully restored your purchase!, delegate: nil, cancelButtonTitle: OK).show() break default: print(IAP not found) } } }func fetchAvailableProducts() { / let productIdentifiers = NSSet(objects: N
I am having this issue as well.Sometimes everything works fine.Sometimes it does not.When things are not working I have figured out one thing that is reproducable-If i open the app from a full quit- try to restore purchases (fails)- purchase an item- try to restore purchases (fails)But, if I open the app from a full quit- purchase an item- try to restore purchases (success)Has anyone filed a bug report yet?
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Hello, I've been trying out local testing of in-app purchases in Xcode 12, and it seems that I can't restore previously purchased products. More precisely, when I purchase a product and then I tap on it to purchase it again (for free this time) then it works well and I see the new transaction in the Transactions Manager in Xcode as Restored. However, when I use a custom Restore button to initiate a restore process using the restoreCompletedTransactions() method of the StoreKit nothing happens, and the number of transactions in the queue object of the paymentQueueRestoreCompletedTransactionsFinished(:)_ is zero. Are there any steps that I'm missing so I can test product restore locally in Xcode? Thanks for any help in advance!
No matter how many brand new Sandbox Test Users I create, and restarting the iPhone and restarting XCode, and running Clean build...When I click to Restore Purchases and run the SKPaymentQueue.defaultQueue().restoreCompletedTransactions() code, the system return multiple in-app product identifiers that were previously purchased and begins to restore them.If I've created a brand new test user, why do they have a purchase history? How can I newly test my in-app purchases and restores without this purchase history persisting across my test users?Thanks so much in advance for your help!