How to combine StoreKit with promo codes for in-app purchases?

My app uses StoreKit to process in-app purchases. Now I would like to use the recently introduced feature code feature . The documentation explains how to create and redeem codes. However, I do not mean how the redeemed promo code will be reflected inside my application (anyway, the user should receive a notification about the product that he receives for free).

Currently, the application generates SKProductRequestand receives SKProductReponse, in order to receive prices, headers and additional information for each product:

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response;
{
    NSNumber* price1 = [response.products objectAtIndex:0].price;
    ...
}

Now I either expected that the price for the product already paid off would be 0, which is currently not the case. Alternatively, I would suggest that there is some API that tells me whether the user really has to pay for one instance of the product.

+4
source share

Source: https://habr.com/ru/post/1666395/


All Articles