I am having an In-App-Purchase for an iPhone app.
I want to display the price in the users local currency in a UILabel. For this I need the price & currency in a
The correct way to determine any of that information is to use an SKProduct object, retrieved from the SKProductResponse object returned to the delegate after a call to - (void) start on an initialized SKProductsRequest. Something like this:
SKProductsRequest *req = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObject:@"Identifier"]];
req.delegate = self;
[req start];
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse: (SKProductsResponse *)response {
[request autorelease];
if (response.products.count) {
SKProduct *product = [response.products objectAtIndex:0];
NSLocale *priceLocale = product.priceLocale;
NSDecimalNumber *price = product.price;
NSString *description = product.localizedDescription;
}
}