Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #215 from iosdeveloper/master

If available currency defaults to NSLocaleCurrencyCode
  • Loading branch information...
commit 4222a962719389c82957979597f5dae17e15723d 2 parents d1f9014 + 02672e1
@omz authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 Classes/AppSalesAppDelegate.m
View
6 Classes/AppSalesAppDelegate.m
@@ -32,8 +32,14 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
srandom(time(NULL));
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
+ NSString *currencyCode = [[NSLocale currentLocale] objectForKey:NSLocaleCurrencyCode];
+ if (![[CurrencyManager sharedManager].availableCurrencies containsObject:currencyCode]) {
+ currencyCode = @"USD";
+ }
+
NSDictionary *defaults = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], kSettingDownloadPayments,
+ currencyCode, @"CurrencyManagerBaseCurrency",
nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
Please sign in to comment.
Something went wrong with that request. Please try again.