Search results for

“restore purchases”

22,005 results found

Post

Replies

Boosts

Views

Activity

paymentQueueRestoreCompletedTransactionsFinished Is called when restore process fails
Hi,I am woring on error handling logic for In-App Purchases and I'm running into a strange issue.If I set my iOS device Link Conditioner to 100% loss and then attempt to restore purchases within my app sandbox environment, It never asks the user for an app store password, it then waits a while and then it calls back on -paymentQueueRestoreCompletedTransactionsFinished:queue instead of on - paymentQueue:restoreCompletedTransactionsFailedWithError:If I turn wifi off completely, then it returns on the correct method (- paymentQueue:restoreCompletedTransactionsFailedWithError:)The error handling logic works as follows:If I get a callback on -paymentQueue:restoreCompletedTransactionsFailedWithError:, I present the user with an appropriate error to check their network connection or in-app purchase capabilities.If I get the callback on -paymentQueueRestoreCompletedTransactionsFinished:queue and then see no purchases, I tell the user that the purchases were restored
2
0
493
Oct ’15
TestFlight apps asking for Apple ID sign in when trying to purchase or restore
I am consumer and not a developer so hope this is okay. I’m fairly tech savvy but can’t figure this out for the life of me. I recently changed the email associated with my Apple ID (not sure if relevant) but soon after trying to restore a purchase or buy anything within a TestFlight app, it asks me to sign in with my Apple ID even though I’m signed in. Payments just don’t work. They used to earlier. FWIW the issue occurs on apps I started testing on my old email and the new one.
0
0
471
Aug ’20
Reply to in app purchase
Thank you for your answer, indeed !Now my question is, if I use this function to restore my purchases: @IBAction func restorePurchaseButt (_ sender: Any) { SKPaymentQueue.default (). Add (self) SKPaymentQueue.default (). RestoreCompletedTransactions () / } func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue) { nonConsumablePurchaseMade7 = true UserDefaults.standard.set(nonConsumablePurchaseMade7, forKey: nonConsumablePurchaseMade7) UIAlertView(title: DeriveesPRO, message: You've successfully restored your purchase! Restart your application!, delegate: nil, cancelButtonTitle: OK).show() }How can I recognize that the user had already bought one purchase over another?Because this function restores the purchases but does not allow me to know if this purchase is com.company.Deri.PubsConso or com.company.Deri.PubsThanks for your help.
Topic: App & System Services SubTopic: StoreKit Tags:
Dec ’17
Reply to In-App Purchase Refresh receipt
Yes 1.I've added Transaction observer in my IAP helper classes while getting all products from iTunes.2.Yes logged into same account.3.When i call restoreCompletedTransaction then updatedTransaction method is calling with state restore and purchased also.I have copied purchased transaction original id and purchase id, After execution of the updatedTransaction method I'm validating recipt with APPLE API, there last object contains latest renewal record, purchase id is different from the transaction that i copied from the updatedTransaction method but, purchased_Date,end_Date and all are same.why there is a diff in id?Below is the flow That I'm fallowing for auto-renewal.Case 1:New User New device application installed 1st time Appstore a/c 1When user registering first time app will make purchase with existing App Store credentials.Every purchase will have transaction Id and original transaction Id.BE will store these details in subscriptionInfo.Whe
Topic: App & System Services SubTopic: StoreKit Tags:
May ’17
In-app purchases failing in Testflight
We are experiencing widespread issues (on all versions of iOS) with Testflight In-App purchases failing. Purchases are working as expected in Sandbox environment with Sandbox testers created in iTunes Connect.Normally what used to happen is that we could send a build to our Testflight group and they could use a production App Store account to make purchases (The Apple prompt already says that the purchase is in Beta and they will not be charged. However, now whats happening is the purchase fails with a Cannot connect to iTunes error. To confirm, the SKProducts are loaded perfectly, even a Restore purchase seems to work. Its just buying anything that fails.We have tested using a Sandbox account in TestFlight and this actually works which is not what we expect since Sandbox testers shouldnt work in Testflight?Anyone else experiencing this
18
0
23k
Jun ’16
Reply to In-App Purchase Refresh receipt
Forget about using applicationUserName it will not help you.If the device being used is logged into an iTunesAccount then it will have a receipt that displays the purchases of that iTunes Account. It really does not care who is holding it or what username the current user is using on your server.What you want to do is register a purchase only when it is made or restored or the receipt is refreshed. All these require the iTunes Account username/password of the person who is making the cash payment. Before a user can make or restore the purchase tell them that they must be logged into their account on your server. When the purchase or restore goes through, you record that on your server under their account.
Topic: App & System Services SubTopic: StoreKit Tags:
May ’17
In-App Purchase fails after release
I am developing an iOS application with In-App Purchase (IAP). I tested the IAP (in the sandbox environment) and it's working fine.However, once we released the app we started facing an issue - users buy subscription but the content is still restricted.My app has auto-renewal subscriptions. I check receipt by sending it to Apple Server (buy.itunes.apple.com/verifyReceipt). I receive the receipt[[NSBundle mainBundle] appStoreReceiptURL]Restore purchase via [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]doesn’t work as well.Can I test it in another environment except for sandbox in order to understand what cases the issue?
2
0
1k
Jul ’16
in-app purchase failed on Testflight
Problem:We are experiencing an in-app purchase issue since last Friday. Everything works fine on sandbox environment with sandbox test account. But when it comes to Testflight, all services related to in-app purchase failed, including refreshing receipts, restoring purchase, and making new purchase. They all have the same error msg which is Error Domain=SKErrorDomain Code=0 Cannot connect to iTunes StoreWhat I did:I searched across the forum and found forks posting the same issue. Following their guide, I checked the the banking and tax info, which is all clear. I also tried clearing and recreating test flight users, which did not work.Environment:OS Version: 13.3.1Xcode Version: 11.3.1
11
0
6.8k
Apr ’20
Reply to Restoring multiple purchases
The way to handle restoreCompletedTransactions is to receive a message to the method updatedTransactions. That comes with a state restored rather than a state purchased. The product information is all contained in the transaction that is delivered to that method.The paymentQueueRestoreCompletedTransactionsFinished should not be used to fulfill purchases. It is used to tell the user that the restore process has completed. Actually - it should just detect whether or not a product was already restored through updatedTransactions and, if not, tell the user that nothing was restored.
Topic: App & System Services SubTopic: StoreKit Tags:
Apr ’17
Reply to Re-purchasing autorenewing subscription
Tell the user to tap 'restore' if they already have purchased the item using a different device. Do this either before they are given the option to make the original purchase or when they get the error above. For example, if they get a 'caneclled payment' error then display an alert You did not complete the purchase of a subscription. If you have already purchased a subscription using a different device tap 'restore' below. Otherwise, we hope you will consider purchasing a subscription later.
Topic: App & System Services SubTopic: StoreKit Tags:
Nov ’16
Verifying In-App Purchases with iOS App Sandbox
The iOS App Sandbox plays a pivotal role in ensuring the secure testing of In-App Purchases (IAPs) without impacting real users. To utilize the sandbox, set up your app's IAPs in App Store Connect. Begin by importing the StoreKit framework and fetching product information using SKProductsRequest. Once products are retrieved, initiate purchases through SKPaymentQueue. Implement the SKPaymentTransactionObserver to handle transaction updates, distinguishing between successful, failed, and restored purchases. When testing, remember to use test user accounts and sign in to the App Store with a test account on your device. This ensures a controlled environment for validating IAPs during development. URL - https://www.controlf5.in/ios-mobile-app-development-company/ swift Copy code import StoreKit class YourViewController: UIViewController, SKProductsRequestDelegate, SKPaymentTransactionObserver { func fetchProducts() { let productIdentifiers: Set<String> = [com.yourapp.product1, com
0
0
634
Jan ’24
Reply to Will app review be rejected after remove restore purchased button because we do make sure user no need it now?
To my knowledge, App Review always checks that an In-App Purchase can be restored when a copy of the app is installed to another device. In such case, the reviewer will search for the Restore function. If the user has previously made a successful In-App Purchase, then the app must have a Restore function available.rich kubota - rkubota@apple.comdeveloper technical support CoreOS/Hardware/MFI
Topic: App & System Services SubTopic: StoreKit Tags:
Jan ’20
Correct Filepaths for Restoring Apple-Hosted Content
Greetings folks, I'm implementing logic for restoring my app's non-consumable purchases, but I seem to be hitting a roadblock. It seems my app is looking for the original .zip file that was downloaded from Apple's hosted content servers in the first transaction. But of course, I'm deleting this file after the initial download is completed and the files are transferred out of the Caches directory. So now when this function is called upon trying to restore purchases, the content is not restored. Here's my processDownload function that gets called when active downloads polled in paymentQueue(_ queue: SKPaymentQueue, updatedDownloads downloads: [SKDownload]) are updated to SKDownloadState.finished language public func paymentQueue(_ queue: SKPaymentQueue, updatedDownloads downloads: [SKDownload]) { for download in downloads { switch download.state { case SKDownloadState.active: let p = downloadProgress_ + download.contentIdentifier NotificationCenter.default.post(name: NSNotifi
0
0
347
Mar ’21
paymentQueueRestoreCompletedTransactionsFinished Is called when restore process fails
Hi,I am woring on error handling logic for In-App Purchases and I'm running into a strange issue.If I set my iOS device Link Conditioner to 100% loss and then attempt to restore purchases within my app sandbox environment, It never asks the user for an app store password, it then waits a while and then it calls back on -paymentQueueRestoreCompletedTransactionsFinished:queue instead of on - paymentQueue:restoreCompletedTransactionsFailedWithError:If I turn wifi off completely, then it returns on the correct method (- paymentQueue:restoreCompletedTransactionsFailedWithError:)The error handling logic works as follows:If I get a callback on -paymentQueue:restoreCompletedTransactionsFailedWithError:, I present the user with an appropriate error to check their network connection or in-app purchase capabilities.If I get the callback on -paymentQueueRestoreCompletedTransactionsFinished:queue and then see no purchases, I tell the user that the purchases were restored
Replies
2
Boosts
0
Views
493
Activity
Oct ’15
TestFlight apps asking for Apple ID sign in when trying to purchase or restore
I am consumer and not a developer so hope this is okay. I’m fairly tech savvy but can’t figure this out for the life of me. I recently changed the email associated with my Apple ID (not sure if relevant) but soon after trying to restore a purchase or buy anything within a TestFlight app, it asks me to sign in with my Apple ID even though I’m signed in. Payments just don’t work. They used to earlier. FWIW the issue occurs on apps I started testing on my old email and the new one.
Replies
0
Boosts
0
Views
471
Activity
Aug ’20
Reply to in app purchase
Thank you for your answer, indeed !Now my question is, if I use this function to restore my purchases: @IBAction func restorePurchaseButt (_ sender: Any) { SKPaymentQueue.default (). Add (self) SKPaymentQueue.default (). RestoreCompletedTransactions () / } func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue) { nonConsumablePurchaseMade7 = true UserDefaults.standard.set(nonConsumablePurchaseMade7, forKey: nonConsumablePurchaseMade7) UIAlertView(title: DeriveesPRO, message: You've successfully restored your purchase! Restart your application!, delegate: nil, cancelButtonTitle: OK).show() }How can I recognize that the user had already bought one purchase over another?Because this function restores the purchases but does not allow me to know if this purchase is com.company.Deri.PubsConso or com.company.Deri.PubsThanks for your help.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Dec ’17
Reply to In-App Purchase Refresh receipt
Yes 1.I've added Transaction observer in my IAP helper classes while getting all products from iTunes.2.Yes logged into same account.3.When i call restoreCompletedTransaction then updatedTransaction method is calling with state restore and purchased also.I have copied purchased transaction original id and purchase id, After execution of the updatedTransaction method I'm validating recipt with APPLE API, there last object contains latest renewal record, purchase id is different from the transaction that i copied from the updatedTransaction method but, purchased_Date,end_Date and all are same.why there is a diff in id?Below is the flow That I'm fallowing for auto-renewal.Case 1:New User New device application installed 1st time Appstore a/c 1When user registering first time app will make purchase with existing App Store credentials.Every purchase will have transaction Id and original transaction Id.BE will store these details in subscriptionInfo.Whe
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
May ’17
In-app purchases failing in Testflight
We are experiencing widespread issues (on all versions of iOS) with Testflight In-App purchases failing. Purchases are working as expected in Sandbox environment with Sandbox testers created in iTunes Connect.Normally what used to happen is that we could send a build to our Testflight group and they could use a production App Store account to make purchases (The Apple prompt already says that the purchase is in Beta and they will not be charged. However, now whats happening is the purchase fails with a Cannot connect to iTunes error. To confirm, the SKProducts are loaded perfectly, even a Restore purchase seems to work. Its just buying anything that fails.We have tested using a Sandbox account in TestFlight and this actually works which is not what we expect since Sandbox testers shouldnt work in Testflight?Anyone else experiencing this
Replies
18
Boosts
0
Views
23k
Activity
Jun ’16
Reply to In-App Purchase Refresh receipt
Forget about using applicationUserName it will not help you.If the device being used is logged into an iTunesAccount then it will have a receipt that displays the purchases of that iTunes Account. It really does not care who is holding it or what username the current user is using on your server.What you want to do is register a purchase only when it is made or restored or the receipt is refreshed. All these require the iTunes Account username/password of the person who is making the cash payment. Before a user can make or restore the purchase tell them that they must be logged into their account on your server. When the purchase or restore goes through, you record that on your server under their account.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
May ’17
In-App Purchase fails after release
I am developing an iOS application with In-App Purchase (IAP). I tested the IAP (in the sandbox environment) and it's working fine.However, once we released the app we started facing an issue - users buy subscription but the content is still restricted.My app has auto-renewal subscriptions. I check receipt by sending it to Apple Server (buy.itunes.apple.com/verifyReceipt). I receive the receipt[[NSBundle mainBundle] appStoreReceiptURL]Restore purchase via [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]doesn’t work as well.Can I test it in another environment except for sandbox in order to understand what cases the issue?
Replies
2
Boosts
0
Views
1k
Activity
Jul ’16
in-app purchase failed on Testflight
Problem:We are experiencing an in-app purchase issue since last Friday. Everything works fine on sandbox environment with sandbox test account. But when it comes to Testflight, all services related to in-app purchase failed, including refreshing receipts, restoring purchase, and making new purchase. They all have the same error msg which is Error Domain=SKErrorDomain Code=0 Cannot connect to iTunes StoreWhat I did:I searched across the forum and found forks posting the same issue. Following their guide, I checked the the banking and tax info, which is all clear. I also tried clearing and recreating test flight users, which did not work.Environment:OS Version: 13.3.1Xcode Version: 11.3.1
Replies
11
Boosts
0
Views
6.8k
Activity
Apr ’20
Reply to Restoring multiple purchases
The way to handle restoreCompletedTransactions is to receive a message to the method updatedTransactions. That comes with a state restored rather than a state purchased. The product information is all contained in the transaction that is delivered to that method.The paymentQueueRestoreCompletedTransactionsFinished should not be used to fulfill purchases. It is used to tell the user that the restore process has completed. Actually - it should just detect whether or not a product was already restored through updatedTransactions and, if not, tell the user that nothing was restored.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Apr ’17
Reply to Re-purchasing autorenewing subscription
Tell the user to tap 'restore' if they already have purchased the item using a different device. Do this either before they are given the option to make the original purchase or when they get the error above. For example, if they get a 'caneclled payment' error then display an alert You did not complete the purchase of a subscription. If you have already purchased a subscription using a different device tap 'restore' below. Otherwise, we hope you will consider purchasing a subscription later.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Nov ’16
Verifying In-App Purchases with iOS App Sandbox
The iOS App Sandbox plays a pivotal role in ensuring the secure testing of In-App Purchases (IAPs) without impacting real users. To utilize the sandbox, set up your app's IAPs in App Store Connect. Begin by importing the StoreKit framework and fetching product information using SKProductsRequest. Once products are retrieved, initiate purchases through SKPaymentQueue. Implement the SKPaymentTransactionObserver to handle transaction updates, distinguishing between successful, failed, and restored purchases. When testing, remember to use test user accounts and sign in to the App Store with a test account on your device. This ensures a controlled environment for validating IAPs during development. URL - https://www.controlf5.in/ios-mobile-app-development-company/ swift Copy code import StoreKit class YourViewController: UIViewController, SKProductsRequestDelegate, SKPaymentTransactionObserver { func fetchProducts() { let productIdentifiers: Set<String> = [com.yourapp.product1, com
Replies
0
Boosts
0
Views
634
Activity
Jan ’24
Reply to Will app review be rejected after remove restore purchased button because we do make sure user no need it now?
To my knowledge, App Review always checks that an In-App Purchase can be restored when a copy of the app is installed to another device. In such case, the reviewer will search for the Restore function. If the user has previously made a successful In-App Purchase, then the app must have a Restore function available.rich kubota - rkubota@apple.comdeveloper technical support CoreOS/Hardware/MFI
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Jan ’20
Reply to IAP, wrong priceLocale
Restoring the purchases in our app also worked for me.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Oct ’20
Correct Filepaths for Restoring Apple-Hosted Content
Greetings folks, I'm implementing logic for restoring my app's non-consumable purchases, but I seem to be hitting a roadblock. It seems my app is looking for the original .zip file that was downloaded from Apple's hosted content servers in the first transaction. But of course, I'm deleting this file after the initial download is completed and the files are transferred out of the Caches directory. So now when this function is called upon trying to restore purchases, the content is not restored. Here's my processDownload function that gets called when active downloads polled in paymentQueue(_ queue: SKPaymentQueue, updatedDownloads downloads: [SKDownload]) are updated to SKDownloadState.finished language public func paymentQueue(_ queue: SKPaymentQueue, updatedDownloads downloads: [SKDownload]) { for download in downloads { switch download.state { case SKDownloadState.active: let p = downloadProgress_ + download.contentIdentifier NotificationCenter.default.post(name: NSNotifi
Replies
0
Boosts
0
Views
347
Activity
Mar ’21
Reply to IAP restore mechanism doesn't work in iMessage since iOS 11
Same issue here. Going through the normal purchase routine works to restore it, but past buyers aren't that brave usually to attempt a second purchase just to restore. Everything was fine in iOS10. No code changes here, so something broke along the way.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’18