How do I get purchase(s) from iOS in app purchases? - ios

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.

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.

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.

Is it possible to offer Apple's In App Purchases on an app that offers multiple user log-ins

We're designing an iPad app at the moment which offers in-app purchases for non-consumable items.
As the scope of the project has expanded, we want to allow the option to sign in to an account, and then sign out of that account and into another - similar to how one could on an app like the Facebook app.
My question is: is it possible to link Apple's in-app purchases to one of our system's user accounts, so that a User may sign in to a different device and access their purchases, but if another User signs in to my device, they cannot access my purchases (despite the device being signed in to my Apple ID)?
Any suggestions welcome
All completed in app purchases are tied to the Apple ID that was used at the time of the transaction. Since non-consumable in app purchases can only be purchased once, you can't use those. So, the only option would be to use consumable in app purchases and keep track of which system user account made the purchase. You need to store those purchase records on an external server somewhere though, since Apple will have no way of telling you which purchase went to which of your internal users. If you lose that purchase history your users will have to buy the item again, and probably not be very happy.

How to choose a correct in-app type?

I've read all the in-app documentation and I've tired of fighting with App Review Board, that's why I'm asking for your advice.
Please, help me to choose the right type of in-app purchase for my app and to upgrade my app to use a subscription in-app model (non-renewing subscription is also possible).
This app has an entertaiment text and photo content, which is dynamicaly updated twice a day.
I've got a free version, which has:
Ads
Limitations (limited number of new messages)
No photos
And premium-account with:
No ads
No limitations
Photo content
I want to sell this content like subscription (you can buy a premium-account for a period of time), also I've get a mechanism, that allows to use premium-account from every device you have and you can restore your purchases easily, but App Review Board writes:
The App Review Board evaluated your app and determined that the
original rejection feedback is valid. Your app does not comply with:
11.15
The Purchasability Type for one or more of your In-App Purchase
products was inappropriately set.
Your In-App Purchase is currently flagged as Auto-Renewable
Subscription. However, it would be more appropriate to use the
Non-Consumable In-App Purchase type because the product is used to
unlock features of the app. Non-consumable products are only purchased
once by users and are always available on all devices that are
associated with that user's iTunes account.
How should I change my app to sell my content as subscription?

iOS InApp Purchase

I just wonder if there is anyway to check if a user(email) already buy an in app purchase item in my application.
For example I buy an item on my iPhone, then I log in on my iPad with same itune account. the application will know that this user did buy the item.
Thanks,
Huy
The same thing is happening when you use the restore purchased option in many applications.
SKPaymentTransactionStateRestored
is the constant retrieved from server when you tries to purchase an already purchased item.
Please check this nice tutorial about inApp purchase : inApp purchases
From the In-App Purchase Programming Guide:
Store Kit provides built-in functionality to restore transactions for
non-consumable products, auto-renewable subscriptions and free
subscriptions.
You can restore purchases with the StoreKit framework by calling the restoreCompletedTransactions method of the SKPaymentQueue. Your app will then receive a transaction for each product the user has previously purchased. Simply handle these transaction and unlock the features and/or download content on the new device.
If your product is a consumable (gold coins for your game, health packs etc.) this would not apply and you have to keep track of the purchases on your own.
You will need to set up a server that will keep track of each transaction. And you need to implement a method to authenticate the user across devices (signup via e-mail, Facebook login etc.). Once the user logs in on a new device, your server can tell the app what it should unlock/download.

Resources