据我所知,Store Kit 没有任何要求通用价格等级的功能。您必须询问您的一种产品的当前当地价格。这是一些代码:
- (void) requestProductData
{
SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers:
[NSSet setWithObject: yourProductIdentifier]];
request.delegate = self;
[request start];
}
回调函数:
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
NSArray *myProducts = response.products;
SKProduct *product = [myProducts objectAtIndex:0];
NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
[numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[numberFormatter setLocale:product.priceLocale];
NSString *formattedString = [numberFormatter stringFromNumber:product.price];
NSLog(@"For only %@", formattedString);
}
The above snippets are explained in detail in the official In-App Purchase Programming Guide: http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008267