Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8476963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:19:24+00:00 2026-06-10T18:19:24+00:00

I am using StoreKit to implement an in app purchase store in my application.

  • 0

I am using StoreKit to implement an in app purchase store in my application.

I have a custom design and it means that the value of the price should be white and large, and the currency symbol smaller, darker and aligned to the top of the price value.

I can get the currency symbol without any problems by using the NSLocale in SKproduct‘s priceLocale property, and the value of the price in the price property.

My problem is knowing when I should put the currency symbol before the price and when to put it after the price.

Examples:

  • $5,99
  • 0,79€

I could easily use the NSNumberFormatter to get this worked out “out of the box”, but since my layout defines a different style for the value and currency symbol, I’ve found myself in a position where a more manual workaround is required.

Any thoughts ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:19:26+00:00Added an answer on June 10, 2026 at 6:19 pm

    The locale object doesn’t seem to provide this information directly, but of course the number formatter must know it. You’re not supposed to ask (new-style) number formatters for their format directly, although that’ll probably work, and you can then look for the currency symbol, ¤, in the format string.

    Possibly better would be to create a CFNumberFormatter, which does explicitly allow you to view its format, and then inspect that string:

    // NSLocale and CFLocale are toll-free bridged, so if you have an existing
    // NSNumberFormatter, you can get its locale and use that instead.
    CFLocaleRef usLocale = CFLocaleCreate(NULL, CFSTR("en_US"));
    CFNumberFormatterRef usFormatter = CFNumberFormatterCreate(NULL, usLocale, kCFNumberFormatterCurrencyStyle);
    CFLocaleRef frLocale = CFLocaleCreate(NULL, CFSTR("fr_FR"));
    CFNumberFormatterRef frFormatter = CFNumberFormatterCreate(NULL, frLocale, kCFNumberFormatterCurrencyStyle);
    
    NSString * usString = (__bridge NSString *)CFNumberFormatterGetFormat(usFormatter);
    NSString * frString = (__bridge NSString *)CFNumberFormatterGetFormat(frFormatter);
    
    NSUInteger loc = ([usString rangeOfString:@"¤"]).location;
    NSLog(@"Currency marker at beginning for US? %@", (loc == 0) ? @"YES" : @"NO");
    loc = ([frString rangeOfString:@"¤"]).location;
    NSLog(@"Currency marker at end for FR? %@", (loc == [frString length] - 1) ? @"YES" : @"NO");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created in-app purchase for non-consumable object application in iPhone using with store
I'm using StoreKit for in-app purchases. I'm finding that the API is quirky in
Apple states that all apps using in-app purchases have to put this [[SKPaymentQueue defaultQueue]
I am writing an mac application for the Mac App Store that uses in
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I'm using StoreKit for implement purchacing in my app. My question is how can
I am developing an application and using in-app purchases in it. i have created
I am going to implement StoreKit in an iPhone application and wanted to know
In my iPhone app Im using StoreKit to make it possible for users to
I'm currently writing an In-App purchase plugin for Unity in Objective-C using pure C

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.