Roger
Roger

Reputation: 15813

Determine which store (ie country) an iphone app was purchased from?

For business reasons the project I'm working on has the requirement to determine which country's itunes store an app has been purchased from.

Knowing where the user is at the time of purchase (via location services etc) is not suitable and they would prefer to have 1 universal binary rather than having to have a separate binary for every store.

Is this something the application can determine at run-time?

Upvotes: 0

Views: 672

Answers (3)

Fattie
Fattie

Reputation: 12625

Note: the specific answer is NO. You can NOT get the app store country. (As of mid-2010.)

For general readers, the following could be useful ... it is quite a nuisance to collect exactly these code three fragments together:

// to ("usually") get the preferred language from those we supplied in bundle
// [[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0]

// to ("often") get the preferred language regardless
// [ [NSBundle preferredLocalizationsFromArray:[NSLocale ISOCountryCodes]] objectAtIndex:0]

// to ("fairly reliably") get the user's chosen language setting...
// [ [NSLocale preferredLanguages] objectAtIndex:0]

Cheers

Upvotes: 1

drekka
drekka

Reputation: 21883

Hmm, could this be regarded as a violation of a customers right to privacy? I would imagine you have already looked at the reporting done back to you from the app store. If it's not in that data, I would imagine you won't be able to get it.

Upvotes: -1

Saa
Saa

Reputation: 1615

Have you tried hidden using in-app purchases to determine the store?

Upvotes: 1

Related Questions