Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change paid app to free but know if user previously purchased it

I am considering changing my paid iOS app to be free, making it ad based, and having an in-app purchase option to remove the ads.

This sounds like a good idea if I was just launching the app, but we have over 30k paid downloads, and I don't want those users to ever see the ads when they update to the new version which is free.

Do I have any options here?

like image 858
Nic Hubbard Avatar asked Oct 15 '13 20:10

Nic Hubbard


People also ask

How do you know when an app is paid for free?

AppShopper. The homepage of the AppShopper website is a mixed feed of all the updates from the app store: new apps, whether paid or free, price drops, and app updates. A series of buttons at the top of the screen will allow you filter down to just apps that have dropped in price.

Can I change my app from free to paid?

Once your app has been offered for free, the app can't be changed to paid. If you want to charge for the app, you need to create a new app with a new package name and set a price.

How do I know which apps are paid?

Finding your purchase history Finding purchased apps, in particular, requires a few extra steps. Open the Google Play Store and tap your profile picture at the top right corner. Tap Payments and subscriptions and go to Budget and history. You will find a list of all purchases via Google Play.

Can I change a free app to paid iOS?

Yes, you can change the price whenever you like. When a user downloads the app, whether it is paid or free, they get updates for free. They never have to pay again unless you add an in-app purchase into your app.


2 Answers

As of iOS 7, this can be done using proper receipt validation. Under iOS 7 you can obtain a receipt for the purchased app. Part of the data in the receipt includes information about the original purchase version of the app by the user. You can look at that version and if it is from before the release of your update to free with IAP, you can choose to give the user the full functionality without the user needing to purchase the upgrade again.

Of course if you wish your updated app to work under iOS 6, this is not an option.

See the Receipt Validation Programming Guide for details on receipt validation.

like image 145
rmaddy Avatar answered Oct 09 '22 22:10

rmaddy


try fetch all receipt & analyse them by following data:

"expires_date" = "2017-09-24 11:25:19 Etc/GMT"; "original_purchase_date" = "2017-09-24 11:20:21 Etc/GMT"; "product_id" = "com.yourapp.service"; 

1. Get all user's receipts from the app store

+ (NSArray*)all_receipts{     // Load the receipt from the app bundle.     NSURL *receiptURL = [[NSBundle mainBundle]appStoreReceiptURL];     NSData *receipt = [NSData dataWithContentsOfURL:receiptURL];     if(!receipt){         //no receipts yet...         return nil;          }      NSError *error;     NSDictionary *requestContents = @{@"receipt-data": [receipt base64EncodedStringWithOptions:0],                                       @"password":YOUR_SECRED_SHARED};     NSData *requestData = [NSJSONSerialization dataWithJSONObject:requestContents                                                           options:0                                                             error:&error];     if (!requestData) {         return [NSArray array];     }      // Create a POST request with the receipt data.     //get current qa / production url     BOOL sandbox = [[receiptURL lastPathComponent]isEqualToString:@"sandboxReceipt"];     NSURL *storeURL = [NSURL URLWithString:@"https://buy.itunes.apple.com/verifyReceipt"];     if (sandbox) {         storeURL = [NSURL URLWithString:@"https://sandbox.itunes.apple.com/verifyReceipt"];     }     NSDictionary *jsonResponse = [LTServer postUrl:storeURL.absoluteString attach:requestContents];     NSLog(@"jsonResponse %@",jsonResponse);     if(!jsonResponse){         return [NSArray array];     }     NSArray *receipts_data = jsonResponse[@"latest_receipt_info"];     return [receipts_data mutableCopy]; } 

2. Each receipt will contain a dictionary:

    "expires_date" = "2017-09-24 11:25:19 Etc/GMT";     "expires_date_ms" = 1506252319000;     "expires_date_pst" = "2017-09-24 04:25:19 America/Los_Angeles";     "is_trial_period" = true;     "original_purchase_date" = "2017-09-24 11:20:21 Etc/GMT";     "original_purchase_date_ms" = 1506252021000;     "original_purchase_date_pst" = "2017-09-24 04:20:21 America/Los_Angeles";     "original_transaction_id" = 1000000339209266;     "product_id" = "com.yourapp.service";     "purchase_date" = "2017-09-24 11:20:19 Etc/GMT";     "purchase_date_ms" = 1506252419000;     "purchase_date_pst" = "2016-11-27 04:20:19 America/Los_Angeles";     quantity = 1;     "transaction_id" = 1000000337203266;     "web_order_line_item_id" = 1000000030161297; 
like image 33
Ofir Malachi Avatar answered Oct 09 '22 21:10

Ofir Malachi