小编use*_*225的帖子

如何在iOS模拟器中更改应用内priceLocale产品的本地化?

如何在iOS模拟器中更改应用内priceLocale产品的本地化?我总是得到欧元价格,但无法将其兑换成美元。

例子:

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{    
    NSArray *Books = response.products;
    if ([SKPaymentQueue canMakePayments] && [response.products count]>0) {

    }

    for (SKProduct *book in Books) {


        NSLocale *locat=[NSLocale currentLocale];
        NSString *strlocate=[locat objectForKey:NSLocaleCountryCode];


        NSLog(@"\n\n\n Device country== %@ \n\n\n",strlocate);

        NSLocale* storeLocale = book.priceLocale;
        NSString *storeCountry = (NSString*)CFLocaleGetValue((CFLocaleRef)storeLocale, kCFLocaleCountryCode);
        NSLog(@"\n\n\n Store country== %@ \n\n\n",storeCountry);

    }
}
Run Code Online (Sandbox Code Playgroud)

设备国家/地区== 美国

商店国家== DE(始终是DE,我无法更改它

iOS模拟器无法选择当前的AppStore。iOS模拟器中AppStore选择国家的问题有什么解决办法吗?

localization objective-c in-app-purchase ios ios-simulator

5
推荐指数
1
解决办法
3286
查看次数