Should I display Restore subscription button? - ios

Is there really need in this button? When I verify a receipt and discover there is valid subscription, doesn't it uniquely say, that the subscription is valid and there is no need to run restore process? Or may be there are some cases when it's not possible to determine whether the user had the subscription, for instance on other device?

Your app will be rejected if you submit it with In App Purchases but no Restore button. Even if you have an home-made checking and don't see the goal of the button, add it.
If you try to submit it without Restore button you'll get this rejection message from Apple :
We found that your app offers In-App Purchase/s that can be restored
but it does not include a "Restore" feature to allow users to restore
the previously purchased In-App Purchase/s.
To restore previously purchased In-App Purchase products, it would be
appropriate to provide a "Restore" button and initiate the restore
process when the "Restore" button is tapped.
Don't play with Apple rules :)

Related

Appstore Flutter App Rejection Because of In app purchuase

My app is rejected because of in app purchase. I am using in_app_purchase 0.3.0+2. How can I put "Restore" button for ios?
We found that your app offers in-app purchases that can be restored but does not include a "Restore Purchases" feature to allow users to restore the previously purchased in-app purchases, as specified in the "Restoring Purchase Products" section of the In-App Purchase Programming Guide:
Users restore transactions to maintain access to content they've already purchased. For example, when they upgrade to a new phone, they don't lose all of the items they purchased on the old phone. Include some mechanism in your app to let the user restore their purchases, such as a Restore Purchases button.
Next Steps
To restore previously purchased in-app purchase products, it would be appropriate to provide a "Restore" button and initiate the restore
process when the "Restore" button is tapped by the user. Note that
automatically restoring purchases on launch will not resolve this
issue.
you can use login/signup method for save all purchased account in your own server and the user can login with another device and login and then can restore purchased service. or you can just use apple id [queryPastPurchases] to get past purchases.

In-App Purchase: "Restore Purchases" button on user-bound purchase

I'm currently implementing In-App Purchases in my Swift app. The product is a non-consumable one which activates a kind of Premium version for the user. Usually, with non-consumable purchases, you have to put a "Restore Purchases" button in your app (mandatory). However, my problem with this is: The app, and therefore the purchase, is user-bound. So every user of the app has to register an account with us. As soon as an user purchases the IAP, the user account gets flagged as Premium internally on our server. Once he logs out and logs into another account for example, the purchase gets "deactivated" as during the login process the app gets info from the server whether the user is Premium or not.
So basically, if I'd put a "Restore Purchase" button in my app it would either be kind of useless as the purchase gets activated anyways as soon as the user logs in, or the button would make it possible for someone to purchase the Premium version once and then activate it on an unlimited number of other accounts, too, simply by logging into them and "restoring purchases".
So, question is: Is this button mandatory in my case? I've seen other apps, especially subscription-based ones do this, too.
If you don't implement restore button for your in-app purchase implementation, Apple will reject your app.
Their idea is if any iTunes user has paid for some content, he should be able to access the content on any device.
How you are using the receipt and allowing the user that's up to you.

How to check does user already bought app?

I've working code to make or restore purchase. I'm able to buy and restore.
My idea is to put two buttons on purchase screen: "Buy" and "Restore".
I want to eneble/disable those buttons depending on purchase status.
Simply:
If user not bought yet -> "Buy" enabled and "Restore" disabled
If user bought alredy -> no purchase screen :)
If user bought alredy and reinstal app - "Buy" disabled and "Restore" enabled
Of course I'm using standardUserDefaults but problem starts whe user reinstal app. My question is how to get purchase status from appStore (purchased or not yet)?
You shouldn't do this because Apple requires to always have a restore button or your app will get rejected.
You also shouldn't disable or hide the buttons depending if something was bought or restored.
If the user presses the buy button on a product he already bought he just gets the product for free again, you are never charged twice.
So I wouldn't even bother trying to do this. It also properly makes your users experience more confusing. Better to have a consistent shop experience that doesnt change all the time. Also users might be thinking there is a bug in your game because all they see is a button that doesnt work.
Maybe put a little tick or something next to the buy button if you want to indicate to the user that he already bought the item. You must have some sort of bool or other property that gets set, and saved in NSUserDefaults, once a product was bought. Just use that property to add or remove the tick/indicator.
If you are wondering how to handle the restore button on first press you should use the restore completed delegate method. There you can basically show 2 UIAlertControllers.
1 if nothing restored because nothing was previously bought and 1 that the restore was successful. Check this question I have answered recently for sample code. Restore Purchase : Non-Consumable
"We found that your app offers In-App Purchase/s that can be restored but it does not include a "Restore" feature to allow users to restore the previously purchased In-App Purchase/s. To restore previously purchased In-App Purchase products, it would be appropriate to provide a "Restore" button and initiate the restore process when the "Restore" button is tapped"

In-App Purchases restore button necessary?

guys I've implemented an in-app purchase using PARSE. Now there is no restore button in my app . My DB, hosted on the PARSE cloud has a an attribute called "hasMadePurchase" in my User's table which is checked every time the user tries to make a purchase. The attribute is set to yes as soon as a successful purchase has been made.
Now with that, do I need a restore purchases button for the app to get it through the app store? Cause clearly, even if the user changes his/her device deletes and re-installs the app or whatever he/she will still be able to get all his/her purchases back.
If yes, than what do I need to implement in my restore function? (which would basically do nothing, other than making fake calls, i don't know i am kinda lost)
A restore purchases button is needed only if the app offers non-consumable IAPs, e.g. unlocking content. Our game got rejected recently exactly for this reason - we were offering weapon unlocks and we were missing the restore purchases button.
If you are offering non-consumable IAPs then you can start by looking into [[SKPaymentQueue defaultQueue] restoreCompletedTransactions] and go from there. Basically, this fetches the list of all IAP SKUs that have been previously purchased by the user.

in-app purchase restore button -- provide it even though one doesn't know whether or not the user has purchased the content?

I have had an app update rejected because I don't have a restore button for my in-app purchase. What I don't understand is -- when I first show the iAP to the user, I don't know if they have already made the purchase or not. Am I still supposed to show them the restore button?
For a question on how to implement the restore button, see Apple reject because of In app purchase not implement restore.
Imagine this: The user has your app and buys the IAP. They then get a new device and install your app. The first thing they want to do on the new device is tap on your "Restore Purchases" button so they get back their paid for content.
This assumes of course you are talking about non-consumables or perhaps subscription type purchases.
Basically, any app that sells non-consumables must have a "Restore Purchases" button. You should always show the button. Of course the user may tap the button and there may be nothing to restore. This is fine. Simply display a message telling the user that there was nothing to restore.

Resources