Skip to content

Commit

Permalink
[iOS] Set outer bundle override to ensure locale/icu sets up correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
kylehickinson committed Oct 10, 2023
1 parent 5a54794 commit bc04b9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion ios/app/brave_core_main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,9 @@ - (BraveP3AUtils*)p3aUtils {
}

+ (bool)initializeICUForTesting {
base::apple::SetOverrideFrameworkBundle([NSBundle bundleForClass:self]);
NSBundle* bundle = [NSBundle bundleForClass:self];
base::apple::SetOverrideOuterBundle(bundle);
base::apple::SetOverrideFrameworkBundle(bundle);
return base::i18n::InitializeICU();
}

Expand Down
5 changes: 3 additions & 2 deletions ios/app/brave_main_delegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ @implementation BundleLookupClass
} // namespace

BraveMainDelegate::BraveMainDelegate() {
base::apple::SetOverrideFrameworkBundle(
[NSBundle bundleForClass:[BundleLookupClass class]]);
NSBundle* bundle = [NSBundle bundleForClass:[BundleLookupClass class]];
base::apple::SetOverrideOuterBundle(bundle);
base::apple::SetOverrideFrameworkBundle(bundle);
}

BraveMainDelegate::~BraveMainDelegate() {}
Expand Down

0 comments on commit bc04b9f

Please sign in to comment.