Search results for

“restore purchases”

22,108 results found

Post

Replies

Boosts

Views

Activity

Reply to Suddenly receiving error 21002 from verifyReceipt endpoint for sandbox receipt
Ok, I tried using Restore Purchase item and it looks like the problem gets resolved (at least in sandbox!) with the help of certificate which is valid until Nov 17 20:40:52 2023 GMT. Looks like we'll have fun right before Thanksgiving day this time. If someone is willing to check with production, I can provide 1 line of code and a couple terminal commands. Then those of us who had issues with production builds will have a way out... At least for the users who contacted us.
Topic: App & System Services SubTopic: StoreKit Tags:
Feb ’23
In-App Purchase Restore - No observers found
When I execute a restore on my in-app purchase I'm getting a warning, however the restore is successfully executed. I think this is something new with Xcode 14.3. My test device is running iOS 16.4 This is the warning: : No observers found that respond to paymentQueue:shouldAddStorePayment:forProduct:, will not check for purchase intents It fires at this point in the code. If I comment out the first line, I don't get the warning however, the restore doesn't execute. Is anybody else seeing this or do I have something wrong in my code? I know it's only a warning but any help would be appreciated. @IBAction func restoreButtonTapped(_ sender: UIBarButtonItem) { SKPaymentQueue.default().add(self) SKPaymentQueue.default().restoreCompletedTransactions() } I've included the rest of the code just for a completeness. func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) { for transaction in transactions { switch transaction.tran
5
0
6.1k
Apr ’23
Restoring IAPs with StoreKit does not work in Message Extension
Filed rdar://27754552Attempting to restore purchases from an iOS 10 Message Extension using StoreKit results in the following error:Error Domain=SKErrorDomain Code=1 Cannot connect to iTunes Store UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}App Store Review requires apps with IAP to provide a way to restore purchases. Currently, this API does not work from a message extension.
3
0
543
Aug ’16
Reply to SKProductsRequest fails with SKErrorDomain error 0
Great info giilby. I'll try filling up a test device too, and report back.In my case, yes, most of our IAPs are downloadable, hosted by Apple.Update:I filled up a device to the point where I was getting failed write attempts when I tried to write files to disk (using a separate test app). I then tried an IAP purchase in an App Store version of my app. I couldn't replicate the error, everything worked fine (other than the download failing because of low disk space - but that's an expected error). The device is on iOS 8.4.1.*sigh* I was hoping to get closer to an answer. I have about 20 users now who can't restore purchases and can't buy new purchases.
Topic: App & System Services SubTopic: StoreKit Tags:
Aug ’15
Reply to storeaccountd(453) deny file-write-create
Any follow up on the issues mentioned above? I am experiencing the same behaviour with the macOS App I just launched that has a non-consumable in-app purchase:I see multiple lines of these:sandboxd: ([501]) storeaccountd(501) deny file-write-create /Users/me/Library/Caches/com.my.App ... kernel: Sandbox: storeaccountd(468) deny(1) file-write-create /Users/me/Library/Caches/com.my.AppAndstoreinappd: LoadCompletedMicroPaymentsOperation: Could not install receipt after fetching completed purchases - Error Domain=ISErrorDomain Code=2 “No Receipt.” UserInfo={NSLocalizedDescription=No receipt., NSLocalizedFailureReason=receiptAsString was nil}Finally the SKPaymentTransactionObserver will log that the cannot be restored with an 'Unknown Error.: public func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: Error) { DDLogError(Could not restore purchases ((error.localizedDescription))) }My app has the in-app purchases entitlement and I don't un
Topic: App & System Services SubTopic: StoreKit Tags:
Mar ’17
Reply to No MAS receipt after exit(173)
Thanks for your reply, Rich, really much appreciated! Providing a freemium app I'm fine with removing the receipt validation at launch. IAP processing is handling a missing receipt now gracefully like no purchase (doing nothing), and the Restore Purchases option pulls the receipt ... so I'm good for now. Nevertheless it has a smell that the sandbox environment is not acting like production, and testing cannot be done with full code coverage. In addition - as Brigitte mentioned - the exit(173) is still documented as the proposed step when no receipt is present - especially to check for a legit app at launch. DCAppAttestService cannot cover this for existing apps with support of older macOS versions (like mine).
Jun ’22
Cannot restore in-app subscription purchase
I have problems with restore in-app subscription. “Some” (not all) users failed to restore the purchase information from App Store.My implementation is like below (All business logics are eliminated.)When the application call “paymentQueueRestoreCompletedTransactionsFinished” sometimes _restoreOk seems incorrectly set to false.I suspect that updatedTransactions is not called or SKPaymentTransactionStateRestored is not returned even though the subscription is enabled at App Store.Did I miss something?@implementation AppStore {} - (id)init { [[SKPaymentQueue defaultQueue] addTransactionObserver:self]; } - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_3_0) { [self paymentQueue:queue updatedTransaction:transactions]; } - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransaction:(NSArray *)transactions { for (SKPaymentTransaction *transaction in transactions) { switch (transaction.transactionState) {
0
0
445
Jul ’17
"This in-app purchase has already been bought" Error and SSL Failure on Restore
There is a project that has been running online for years. A few months ago, a player reported that after making their first successful IAP at a specific purchase point, any subsequent attempts to purchase the same item do not trigger the payment window. Instead, they get the error:This in-app purchase has already been bought.After contacting Apple Support once, the player was able to make a payment, but the issue reappeared on the next attempt. So far, this is the only user reporting the problem, other people can purchase normally. Question1: Here’s what I’ve tried: I reviewed the code and ensured that TransactionObserveris correctly called. I’ve also added **[[SKPaymentQueue defaultQueue] finishTransaction:transaction]**in all possible places, but the issue persists. According to the logs, after the user’s first purchase, every subsequent IAP attempt returns the same receipt from the initial successful transaction, even though I’m certain finishTransactionis bein
0
0
94
Dec ’25
In-app Purchase-Restore regulations for non-consumable items
When in-app purchase is requested for an already purchased non-consumable item the StoreKit first asks to confirm a new purchase and only after that finds the purchase and offers the item for free. To avoid this confusion my applications first tried to restore the purchase and if not found prompted for a new purchase. This approach didn't get complaints neither from end users nor from the Apple review team ... until recently. When I submitted new releases of my apps, they were rejected by the review team who insisted that the app must have two buttons: one for Purchase, another for Restore. Both application are designed in a way that makes adding a button to startup page completely undesirable. To reach a consensus, I decided that 'Purchase' button instead of immediately starting the process, should bring up an additional dialog to select 'Purchase', 'Restore' or 'Cancel'. This effectively creates two s
0
0
423
Aug ’20
how to restore existing in app purchase which is removed from the sale
how to restore existing in app purchase which is removed from the sale?We had auto-renewable purchases and apple approved it and our app got publishd in App Store Later on Apple reailized that our in-app purchase doesn't fit to their Auto_Renewable guidlines and forcing us to remove it from the sale and suggested us to use Non-Renewable subscription type. Since it was already published to App Store, user downloaded our app and subscribed to our Auto-Renewable option.If i remove it from sale then all these users who had activated this feature will loose our functionality.Will StoreKit send these purchase recipes when user click on ‘Restore’ even if its removed from sale so that i can make use of it and activate the functionality for these users?
0
0
311
Jun ’15
StoreKit 2 in-app purchase restore
Apps that support in-app purchases are rejected in App Review unless they implement the ability to restore previous purchases. There is a WWDC 2022 video on doing exactly that and I am doing what that video suggests, but my app is still rejected. Here's what they say: When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code Sandbox receipt used in production, you should validate against the test environment instead. To which I replied: I don’t have a server. Can you explain what “your server” means for an iOS app that has no server-side components? But they won't explain themselves. They just say: Your question requires technical assistance and would be best addressed by Apple Developer Technical Support who can provide discr
2
0
4.1k
Sep ’22
In-App Purchase Refresh receipt
Hi Guys,I'm implementing Auto-renewebla subscription for my app.we have a plans for user to access for one month, 3 months, 1 year.While registering user has to choos one of the plan.After registration user can upgrade/downgrade his plan through app.As per appl guidelines we need to implement restore purchase in app.if i restore the purchase, i'll get all the purchased details, but how i know which plan is purchased recently?Currently i'm using Receipt Verification API to get all the purchase details. in that response I'll array of purchased records, and last object will be the latest, so that i'll know last one latest and ill give access to the user based on purchased dates and end date.How can achive this using restore purchase or refreshingreceipt?Thank you in advance.
20
0
6.4k
Apr ’17
Reply to Is it OK to store In-App purchase receipts into CloudKit?
For things like unlocking app features, just use a normal, non-consumable purchase, and then it will show up on new devices tied to the same iTunes account as soon as the user does a restore purchases without you having to implement any special storage at all.For consumables, it might make sense to use iCloud that way, with the caveat that if you sell someone 1,000 tokens on device A and then they associate device B, they can then turn off the network, play your game, and use 1,000 tokens on each device, for a total of 2,000 tokens. If you don't care about that, then by all means, go for it. But consumables are more typically treated as per-device for that reason (and explicitly not stored on any sort of account server).
Topic: App & System Services SubTopic: StoreKit Tags:
Nov ’15
Reply to Auto-Renewal Problem - Receipt not be updated
Thank @richThe major problem is that after restore purchased transactions, the receipt in the macOS app bundle will not be updated (checked manually and using code).The code works well on the iOS device (the receipt will be updated correctly)For the macOS app, I have to write code to save the transaction date (monitor by transactionObserver) in safe area, and write code to validate if the purchase expired. This problem was reported at beginging of this year at https://forums.developer.apple.com/message/290288#290288 and a year ago at https://forums.developer.apple.com/message/258440#258440 by other users. I thought I may made a mistake, it's hard to believe it's a bug as it's so important and so basic for the local verification of auto-renewal subscriptions. Thanks,
Topic: App & System Services SubTopic: StoreKit Tags:
Sep ’18
Reply to Suddenly receiving error 21002 from verifyReceipt endpoint for sandbox receipt
Ok, I tried using Restore Purchase item and it looks like the problem gets resolved (at least in sandbox!) with the help of certificate which is valid until Nov 17 20:40:52 2023 GMT. Looks like we'll have fun right before Thanksgiving day this time. If someone is willing to check with production, I can provide 1 line of code and a couple terminal commands. Then those of us who had issues with production builds will have a way out... At least for the users who contacted us.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Feb ’23
In-App Purchase Restore - No observers found
When I execute a restore on my in-app purchase I'm getting a warning, however the restore is successfully executed. I think this is something new with Xcode 14.3. My test device is running iOS 16.4 This is the warning: : No observers found that respond to paymentQueue:shouldAddStorePayment:forProduct:, will not check for purchase intents It fires at this point in the code. If I comment out the first line, I don't get the warning however, the restore doesn't execute. Is anybody else seeing this or do I have something wrong in my code? I know it's only a warning but any help would be appreciated. @IBAction func restoreButtonTapped(_ sender: UIBarButtonItem) { SKPaymentQueue.default().add(self) SKPaymentQueue.default().restoreCompletedTransactions() } I've included the rest of the code just for a completeness. func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) { for transaction in transactions { switch transaction.tran
Replies
5
Boosts
0
Views
6.1k
Activity
Apr ’23
Restoring IAPs with StoreKit does not work in Message Extension
Filed rdar://27754552Attempting to restore purchases from an iOS 10 Message Extension using StoreKit results in the following error:Error Domain=SKErrorDomain Code=1 Cannot connect to iTunes Store UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}App Store Review requires apps with IAP to provide a way to restore purchases. Currently, this API does not work from a message extension.
Replies
3
Boosts
0
Views
543
Activity
Aug ’16
Reply to SKProductsRequest fails with SKErrorDomain error 0
Great info giilby. I'll try filling up a test device too, and report back.In my case, yes, most of our IAPs are downloadable, hosted by Apple.Update:I filled up a device to the point where I was getting failed write attempts when I tried to write files to disk (using a separate test app). I then tried an IAP purchase in an App Store version of my app. I couldn't replicate the error, everything worked fine (other than the download failing because of low disk space - but that's an expected error). The device is on iOS 8.4.1.*sigh* I was hoping to get closer to an answer. I have about 20 users now who can't restore purchases and can't buy new purchases.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Aug ’15
Reply to storeaccountd(453) deny file-write-create
Any follow up on the issues mentioned above? I am experiencing the same behaviour with the macOS App I just launched that has a non-consumable in-app purchase:I see multiple lines of these:sandboxd: ([501]) storeaccountd(501) deny file-write-create /Users/me/Library/Caches/com.my.App ... kernel: Sandbox: storeaccountd(468) deny(1) file-write-create /Users/me/Library/Caches/com.my.AppAndstoreinappd: LoadCompletedMicroPaymentsOperation: Could not install receipt after fetching completed purchases - Error Domain=ISErrorDomain Code=2 “No Receipt.” UserInfo={NSLocalizedDescription=No receipt., NSLocalizedFailureReason=receiptAsString was nil}Finally the SKPaymentTransactionObserver will log that the cannot be restored with an 'Unknown Error.: public func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: Error) { DDLogError(Could not restore purchases ((error.localizedDescription))) }My app has the in-app purchases entitlement and I don't un
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Mar ’17
Reply to No MAS receipt after exit(173)
Thanks for your reply, Rich, really much appreciated! Providing a freemium app I'm fine with removing the receipt validation at launch. IAP processing is handling a missing receipt now gracefully like no purchase (doing nothing), and the Restore Purchases option pulls the receipt ... so I'm good for now. Nevertheless it has a smell that the sandbox environment is not acting like production, and testing cannot be done with full code coverage. In addition - as Brigitte mentioned - the exit(173) is still documented as the proposed step when no receipt is present - especially to check for a legit app at launch. DCAppAttestService cannot cover this for existing apps with support of older macOS versions (like mine).
Replies
Boosts
Views
Activity
Jun ’22
Cannot restore in-app subscription purchase
I have problems with restore in-app subscription. “Some” (not all) users failed to restore the purchase information from App Store.My implementation is like below (All business logics are eliminated.)When the application call “paymentQueueRestoreCompletedTransactionsFinished” sometimes _restoreOk seems incorrectly set to false.I suspect that updatedTransactions is not called or SKPaymentTransactionStateRestored is not returned even though the subscription is enabled at App Store.Did I miss something?@implementation AppStore {} - (id)init { [[SKPaymentQueue defaultQueue] addTransactionObserver:self]; } - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_3_0) { [self paymentQueue:queue updatedTransaction:transactions]; } - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransaction:(NSArray *)transactions { for (SKPaymentTransaction *transaction in transactions) { switch (transaction.transactionState) {
Replies
0
Boosts
0
Views
445
Activity
Jul ’17
"This in-app purchase has already been bought" Error and SSL Failure on Restore
There is a project that has been running online for years. A few months ago, a player reported that after making their first successful IAP at a specific purchase point, any subsequent attempts to purchase the same item do not trigger the payment window. Instead, they get the error:This in-app purchase has already been bought.After contacting Apple Support once, the player was able to make a payment, but the issue reappeared on the next attempt. So far, this is the only user reporting the problem, other people can purchase normally. Question1: Here’s what I’ve tried: I reviewed the code and ensured that TransactionObserveris correctly called. I’ve also added **[[SKPaymentQueue defaultQueue] finishTransaction:transaction]**in all possible places, but the issue persists. According to the logs, after the user’s first purchase, every subsequent IAP attempt returns the same receipt from the initial successful transaction, even though I’m certain finishTransactionis bein
Replies
0
Boosts
0
Views
94
Activity
Dec ’25
In-app Purchase-Restore regulations for non-consumable items
When in-app purchase is requested for an already purchased non-consumable item the StoreKit first asks to confirm a new purchase and only after that finds the purchase and offers the item for free. To avoid this confusion my applications first tried to restore the purchase and if not found prompted for a new purchase. This approach didn't get complaints neither from end users nor from the Apple review team ... until recently. When I submitted new releases of my apps, they were rejected by the review team who insisted that the app must have two buttons: one for Purchase, another for Restore. Both application are designed in a way that makes adding a button to startup page completely undesirable. To reach a consensus, I decided that 'Purchase' button instead of immediately starting the process, should bring up an additional dialog to select 'Purchase', 'Restore' or 'Cancel'. This effectively creates two s
Replies
0
Boosts
0
Views
423
Activity
Aug ’20
how to restore existing in app purchase which is removed from the sale
how to restore existing in app purchase which is removed from the sale?We had auto-renewable purchases and apple approved it and our app got publishd in App Store Later on Apple reailized that our in-app purchase doesn't fit to their Auto_Renewable guidlines and forcing us to remove it from the sale and suggested us to use Non-Renewable subscription type. Since it was already published to App Store, user downloaded our app and subscribed to our Auto-Renewable option.If i remove it from sale then all these users who had activated this feature will loose our functionality.Will StoreKit send these purchase recipes when user click on ‘Restore’ even if its removed from sale so that i can make use of it and activate the functionality for these users?
Replies
0
Boosts
0
Views
311
Activity
Jun ’15
StoreKit 2 in-app purchase restore
Apps that support in-app purchases are rejected in App Review unless they implement the ability to restore previous purchases. There is a WWDC 2022 video on doing exactly that and I am doing what that video suggests, but my app is still rejected. Here's what they say: When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code Sandbox receipt used in production, you should validate against the test environment instead. To which I replied: I don’t have a server. Can you explain what “your server” means for an iOS app that has no server-side components? But they won't explain themselves. They just say: Your question requires technical assistance and would be best addressed by Apple Developer Technical Support who can provide discr
Replies
2
Boosts
0
Views
4.1k
Activity
Sep ’22
Universal Purchase but different prices for each product
Is it possible to make separate auto-renewable subscriptions for each platform in Universal Purchase? How does restore purchase work in that case?
Replies
0
Boosts
0
Views
570
Activity
Mar ’23
In-App Purchase Refresh receipt
Hi Guys,I'm implementing Auto-renewebla subscription for my app.we have a plans for user to access for one month, 3 months, 1 year.While registering user has to choos one of the plan.After registration user can upgrade/downgrade his plan through app.As per appl guidelines we need to implement restore purchase in app.if i restore the purchase, i'll get all the purchased details, but how i know which plan is purchased recently?Currently i'm using Receipt Verification API to get all the purchase details. in that response I'll array of purchased records, and last object will be the latest, so that i'll know last one latest and ill give access to the user based on purchased dates and end date.How can achive this using restore purchase or refreshingreceipt?Thank you in advance.
Replies
20
Boosts
0
Views
6.4k
Activity
Apr ’17
Reply to Is it OK to store In-App purchase receipts into CloudKit?
For things like unlocking app features, just use a normal, non-consumable purchase, and then it will show up on new devices tied to the same iTunes account as soon as the user does a restore purchases without you having to implement any special storage at all.For consumables, it might make sense to use iCloud that way, with the caveat that if you sell someone 1,000 tokens on device A and then they associate device B, they can then turn off the network, play your game, and use 1,000 tokens on each device, for a total of 2,000 tokens. If you don't care about that, then by all means, go for it. But consumables are more typically treated as per-device for that reason (and explicitly not stored on any sort of account server).
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Nov ’15
Reply to Auto-Renewal Problem - Receipt not be updated
Thank @richThe major problem is that after restore purchased transactions, the receipt in the macOS app bundle will not be updated (checked manually and using code).The code works well on the iOS device (the receipt will be updated correctly)For the macOS app, I have to write code to save the transaction date (monitor by transactionObserver) in safe area, and write code to validate if the purchase expired. This problem was reported at beginging of this year at https://forums.developer.apple.com/message/290288#290288 and a year ago at https://forums.developer.apple.com/message/258440#258440 by other users. I thought I may made a mistake, it's hard to believe it's a bug as it's so important and so basic for the local verification of auto-renewal subscriptions. Thanks,
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Sep ’18