Appstore Flutter App Rejection Because of In app purchuase - ios

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.

Related

Should I display Restore subscription button?

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 :)

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 do I get purchase(s) from iOS in app purchases?

I want to get purchase or purchases made by the user even if purchased from other devices.
When an in-app purchase is purchased on one device, it is marked as a purchase by the user. So, a non-consumable purchase is available on all devices owned by the user after a single purchase.
If you create a consumable purchase and handle it using the login of your app, you should be able to do this. Of course, Apple's review process will check whether this is fair by the user.

how to detect that the app is previously purchased by user

I recently changed my paid app model to in-app purchase model, its easy to detect that the users who already purchased the app will not get the in-app purchase options when they update the app.
But the problem if these users delete the app and download again or they download in new device, then how to detect that the app is previously purchased.
I am not talking about in-app purchase or restore purchase. I want to detect user who purchased app from app store not from in-app purchase.

Can a user restore purchases if they cannot make payments?

In IOS you can check if the user can make in app purchases with this:
SKPaymentQueue.canMakePayments()
I was wondering, if the user cannot make payments can they still restore purchases (for example if the app has just been reinstalled if the user can tap a restore purchase button to get back their inapp purchases)?
Restore purchase functionality will pick up the iTunes credentials from Settings and hit the Server for with those details alongside the app details. So if there ever has been a purchase made from that account for that app, then the user will receive his purchase otherwise blank response, which needs to be handled on client side.

Resources