How to query in objective-c to get the details if users purchased the app for price or downloaded during free period

Hi,


I am not talking about In App Purchases but normal purchase from App Store. Is there a receipt to get the information on what price the user purchased the App. For example if I have the app price for $3.99 and i make it free for 2 days. I want to differentiate the users who downloaded the App during the trial period or downloaded with paying for the App. If user purchase the App shouldn't we have some receipt for the purchase ? Like downloaded at this date for this price.

Replies

There is no pricing information in the receipt.


You can use the receipt_creation_date in the receipt but that gets reset if the user deletes and reinstalls the app from the App Store (I think).


One approach that tries to do what you want is to write something to the user's iCloud account immediately upon launch that indicates the date of first launch (unfortunately not the date of 'purchase'). Use that date to determine the price point. And combining above with this - you can write the receipt_creation_date on first launch.


The receipt contains the app version/build (original_application_version field). That can also imply a price point but only if you adjust price only for each version/build.

Thank you for replying.


So its not possible to get in what price the user purchased. But we have to make certain updates to get and calculate myself. But if this is the case I have to plan the dates manually and give special privilages to the users for those date?

>give special privilages to the users


From the ASRGs:


3.1 Payments

3.1.1 In-App Purchase:

  • If you want to unlock features or functionality within your app, (by way of example: subscriptions, in-game currencies, game levels, access to premium content, or unlocking a full version), you must use in-app purchase. Apps may not use their own mechanisms to unlock content or functionality, such as license keys, augmented reality markers, QR codes, etc. Apps and their metadata may not include buttons, external links, or other calls to action that direct customers to purchasing mechanisms other than in-app purchase.

>But if this is the case I have to plan the dates manually and give special privilages to the users for those date?


Your problem will be how to allow a user who obtained the app on one date (free) to obtain the same rights as someone who obtained the app on a later date (paid). The only way to do that is through an IAP. A common scenario, not unlike what you are trying to accomplish, is the conversion from a paid app to a freemium app. It goes like this:

App released in 2018, Version 1.1, for $3 with full functionality.

App released in 2019, Version 1.2, for free but with limited functionality. App can be upgraded through an IAP for $3 to full functionality. Version 1.2 checks the receipt to determine the original_application_version. If that is "1.1" it upgrades to full functionality without needing IAP.


You want to do something similar. You would need an IAP to upgrade and you would check the date of first launch to determine if a free upgrade is appropriate. But this will generate lots of complaints since the 'date of first launch' may not be the 'date of purchase'.