Skip to content
Browse files

Added Support for 3 New regions - SG, HK, TW

Added Support for 3 New regions
Singapore
Hong Kong
Taiwan
  • Loading branch information...
1 parent 2a125aa commit 94ae9049153db23cdd3b8d81915c4c0accd5bf10 @nglayton nglayton committed
Showing with 40 additions and 4 deletions.
  1. +3 −0 Classes/Country_v1.m
  2. +16 −1 Classes/ItunesConnectDownloaderOperation.m
  3. +4 −1 Classes/ReportTypes.h
  4. +17 −2 Classes/Report_v1.m
View
3 Classes/Country_v1.m
@@ -142,6 +142,9 @@ - (ReportRegion) reportRegion
else if ([cntry_code isEqualToString:@"CN"]) region=ReportRegionChina;
else if ([cntry_code isEqualToString:@"DK"]) region=ReportRegionDenmark;
else if ([cntry_code isEqualToString:@"SE"]) region=ReportRegionSweden;
+ else if ([cntry_code isEqualToString:@"SG"]) region=ReportRegionSingapore;
+ else if ([cntry_code isEqualToString:@"HK"]) region=ReportRegionHongKong;
+ else if ([cntry_code isEqualToString:@"TW"]) region=ReportRegionTaiwan;
else region=ReportRegionRestOfWorld;
View
17 Classes/ItunesConnectDownloaderOperation.m
@@ -74,6 +74,9 @@ - (ReportRegion)regionFromCode:(NSString *)regionCode
else if ([regionCode isEqualToString:@"CN"]) region = ReportRegionChina;
else if ([regionCode isEqualToString:@"DK"]) region = ReportRegionDenmark;
else if ([regionCode isEqualToString:@"SE"]) region = ReportRegionSweden;
+ else if ([regionCode isEqualToString:@"SG"]) region = ReportRegionSingapore;
+ else if ([regionCode isEqualToString:@"HK"]) region = ReportRegionHongKong;
+ else if ([regionCode isEqualToString:@"TW"]) region = ReportRegionTaiwan;
else region = ReportRegionUnknown;
return region;
@@ -144,7 +147,19 @@ - (ReportRegion)regionFromString:(NSString *)string
{
return ReportRegionSweden;
}
-
+ if ([string isEqualToString:@"Singapore"])
+ {
+ return ReportRegionSingapore;
+ }
+ if ([string isEqualToString:@"Hong Kong"])
+ {
+ return ReportRegionHongKong;
+ }
+ if ([string isEqualToString:@"Taiwan"])
+ {
+ return ReportRegionTaiwan;
+ }
+
return ReportRegionUnknown;
}
View
5 Classes/ReportTypes.h
@@ -20,4 +20,7 @@ typedef enum {
ReportRegionNewZealand = 11,
ReportRegionChina = 12,
ReportRegionDenmark = 13,
- ReportRegionSweden = 14} ReportRegion;
+ ReportRegionSweden = 14,
+ ReportRegionSingapore = 15,
+ ReportRegionHongKong = 16,
+ ReportRegionTaiwan = 17} ReportRegion;
View
19 Classes/Report_v1.m
@@ -1003,7 +1003,13 @@ - (NSString *)shortNameForRegion:(ReportRegion)reportRegion
case ReportRegionDenmark:
return @"DK";
case ReportRegionSweden:
- return @"SE";
+ return @"SE";
+ case ReportRegionSingapore:
+ return @"SG";
+ case ReportRegionHongKong:
+ return @"HK";
+ case ReportRegionTaiwan:
+ return @"TW";
default:
return @"??";
}
@@ -1098,7 +1104,16 @@ - (NSString *)listDescriptionShorter:(BOOL)shorter
break;
case ReportRegionSweden:
region_name = @"Sweden";
- break;
+ break;
+ case ReportRegionSingapore:
+ region_name = @"Sinapore";
+ break;
+ case ReportRegionHongKong:
+ region_name = @"Hong Kong";
+ break;
+ case ReportRegionTaiwan:
+ region_name = @"Taiwan";
+ break;
default:
region_name = @"Invalid Region";
}

0 comments on commit 94ae904

Please sign in to comment.
Something went wrong with that request. Please try again.