Skip to content

Commit 59514d6

Browse files
authored
[Issue #442] Update libPhoneNumber MetaData to v. 9.0.25 (#443)
9.0.25 Release: https://github.com/google/libphonenumber/releases/tag/v9.0.25 * Improve bundle searching logic to work for MacOS Unit tests * MacOS Unit tests were failing because they were unable to find the necessary bundle * Now go through the hierarchy of bundles and folders looking for the necessary bundle
1 parent cc78d1f commit 59514d6

10 files changed

Lines changed: 6062 additions & 6069 deletions

File tree

generatedJSON/PhoneNumberMetaData.json

Lines changed: 134 additions & 144 deletions
Large diffs are not rendered by default.

generatedJSON/ShortNumberMetadata.json

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15564,7 +15564,7 @@
1556415564
[
1556515565
null,
1556615566
null,
15567-
"1\\d{2,4}",
15567+
"1\\d\\d(?:\\d(?:\\d(?:\\d{3})?)?)?",
1556815568
null,
1556915569
null,
1557015570
null,
@@ -15574,7 +15574,8 @@
1557415574
[
1557515575
3,
1557615576
4,
15577-
5
15577+
5,
15578+
8
1557815579
]
1557915580
],
1558015581
null,
@@ -15647,7 +15648,7 @@
1564715648
[
1564815649
null,
1564915650
null,
15650-
"1(?:[016-9]114|3(?:0[01]|2|3[0-35-9]|45?|5[057]|6[569]|7[79]|8[2589]|9[0189]))|1(?:0[015]|1\\d|2[01357-9]|41|8[28])",
15651+
"1(?:[01679]114|3(?:0[01]|2|3[0-35-9]|45?|5[057]|6[569]|7[79]|8[2589]|9[0189])|55[15]\\d{4}|8(?:(?:11|44|66)\\d{4}|[28]))|1(?:0[015]|1\\d|2[01357-9]|41|8114)",
1565115652
null,
1565215653
null,
1565315654
null,
@@ -15670,7 +15671,7 @@
1567015671
[
1567115672
null,
1567215673
null,
15673-
"1(?:0[01]|1[4-6]|41)|1(?:[06-9]1\\d|111)\\d",
15674+
"1(?:0[01]|1[4-6]|41|8114)|1(?:[0679]1\\d|111)\\d",
1567415675
null,
1567515676
null,
1567615677
null,
@@ -15686,15 +15687,15 @@
1568615687
[
1568715688
null,
1568815689
null,
15690+
"1(?:55|8[146])\\d{5}",
1568915691
null,
1569015692
null,
1569115693
null,
15692-
null,
15693-
null,
15694+
"15500000",
1569415695
null,
1569515696
null,
1569615697
[
15697-
-1
15698+
8
1569815699
]
1569915700
]
1570015701
],
@@ -23840,7 +23841,7 @@
2384023841
[
2384123842
null,
2384223843
null,
23843-
"[159]\\d\\d(?:\\d{4})?",
23844+
"[12459]\\d\\d(?:\\d{3,4})?",
2384423845
null,
2384523846
null,
2384623847
null,
@@ -23849,6 +23850,7 @@
2384923850
null,
2385023851
[
2385123852
3,
23853+
6,
2385223854
7
2385323855
]
2385423856
],
@@ -23921,7 +23923,7 @@
2392123923
[
2392223924
null,
2392323925
null,
23924-
"(?:1[01]|51)\\d{5}|911|1[1-9]\\d",
23926+
"[1245][01]\\d{5}|(?:1[1-9]|[245]0\\d{3})\\d|911",
2392523927
null,
2392623928
null,
2392723929
null,
@@ -23944,29 +23946,31 @@
2394423946
[
2394523947
null,
2394623948
null,
23947-
"(?:1[01]|51)\\d{5}",
23949+
"[1245][01]\\d{5}|[245]0\\d{4}",
2394823950
null,
2394923951
null,
2395023952
null,
23951-
"1000000",
23953+
"200000",
2395223954
null,
2395323955
null,
2395423956
[
23957+
6,
2395523958
7
2395623959
]
2395723960
],
2395823961
null,
2395923962
[
2396023963
null,
2396123964
null,
23962-
"(?:1[01]|51)\\d{5}",
23965+
"[1245][01]\\d{5}|[245]0\\d{4}",
2396323966
null,
2396423967
null,
2396523968
null,
23966-
"1000000",
23969+
"200000",
2396723970
null,
2396823971
null,
2396923972
[
23973+
6,
2397023974
7
2397123975
]
2397223976
]

libPhoneNumber-GeocodingParser/libPhoneNumber-GeocodingParser.xcodeproj/xcshareddata/xcschemes/libPhoneNumber-GeocodingParser.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</BuildableProductRunnable>
5353
<CommandLineArguments>
5454
<CommandLineArgument
55-
argument = "9.0.18"
55+
argument = "9.0.25"
5656
isEnabled = "YES">
5757
</CommandLineArgument>
5858
</CommandLineArguments>

libPhoneNumber/NBGeneratedPhoneNumberMetaData.m

Lines changed: 4434 additions & 4444 deletions
Large diffs are not rendered by default.
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.

libPhoneNumberShortNumber/NBGeneratedShortNumberMetaData.m

Lines changed: 1468 additions & 1462 deletions
Large diffs are not rendered by default.

libPhoneNumberTestsCommon/NSBundle+Extensions.m

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,14 @@ +(nullable NSString*)pathForFirstResourceNamed:(nonnull NSString*)name ofType:(n
4747
NSArray<NSString *> *contents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:parentBundlePath error:nil];
4848

4949
for (NSString *item in contents) {
50-
// Check if the item has a .bundle extension
51-
if ([item.pathExtension isEqualToString:@"bundle"]) {
52-
NSString *bundlePath = [parentBundlePath stringByAppendingPathComponent:item];
53-
NSBundle *bundle = [NSBundle bundleWithPath:bundlePath];
54-
if (bundle) {
50+
BOOL isDirectory = NO;
51+
NSString *fullPath = [parentBundlePath stringByAppendingPathComponent:item];
52+
53+
// Check if the item has a .bundle extension or a directory (which can be treated as a bundle)
54+
if ([item.pathExtension isEqualToString:@"bundle"] ||
55+
([[NSFileManager defaultManager] fileExistsAtPath:fullPath isDirectory:&isDirectory] && isDirectory)) {
56+
NSBundle *bundle = [NSBundle bundleWithPath:fullPath];
57+
if (bundle != nil) {
5558
[foundBundles addObject:bundle];
5659
}
5760
}
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)