diff options
author | Patrick Luby <patrick.luby@collabora.com> | 2023-04-17 14:26:24 -0400 |
---|---|---|
committer | Patrick Luby <patrick.luby@collabora.com> | 2023-04-17 14:26:24 -0400 |
commit | 3ef4ef90b95345612fb98e161b2d0422d4db7a9e (patch) | |
tree | 7add2e37cc9e606c380d7b9143fa5b22082736eb | |
parent | Fix debug build breakage due to undefined DEBUG_ABSSRCDIR macro on iOS (diff) | |
download | online-ios-master-debug-build-broken-fix.tar.gz online-ios-master-debug-build-broken-fix.zip |
Fix assert failure when running "My Mac (Designed for iPad)" in Xcode
ios-master-debug-build-broken-fix
LANG values such as en_US.UTF-8 trigger an assert in the LibreOffice
code so replace all "_" characters with "-" characters.
Signed-off-by: Patrick Luby <patrick.luby@collabora.com>
Change-Id: Ic28a5dd0ebea9500ac39ced8f6054673e0e68b16
-rw-r--r-- | ios/Mobile/AppDelegate.mm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ios/Mobile/AppDelegate.mm b/ios/Mobile/AppDelegate.mm index 586426b3a2..ab32bdb639 100644 --- a/ios/Mobile/AppDelegate.mm +++ b/ios/Mobile/AppDelegate.mm @@ -231,8 +231,11 @@ static void updateTemplates(NSData *data, NSURLResponse *response) // language, as it might be hard to find the way to set it back to a known language. char *lang = std::getenv("LANG"); + // Fix assert failure when running "My Mac (Designed for iPad)" in Xcode + // LANG values such as en_US.UTF-8 trigger an assert in the LibreOffice + // code so replace all "_" characters with "-" characters. if (lang != nullptr) - app_locale = [NSString stringWithUTF8String:lang]; + app_locale = [[NSString stringWithUTF8String:lang] stringByReplacingOccurrencesOfString:@"_" withString:@"-"]; else app_locale = [[NSLocale preferredLanguages] firstObject]; |