When changing the global locale by
std::locale::global(std::locale(NAME))
where NAME is a valid and supported name of a locale all access using
[UIImage systemImageNamed:@"..."]
fails.
Is there a way to modify the global locale and still have access to the SF Symbols?
I wasn't able to reproduce this. In the iOS 27.2 Simulator and in Mac Catalyst in macOS 27.0.1, I changed the global locale with std::locale::global(std::locale(NAME)), both before and after the app finished launching. I also tried setlocale for each category. systemImageNamed: still returned an image every time.
On an iPhone with iOS 27.2.1, I couldn't change the locale at all. Of the names I tried there, setlocale and std::locale accepted only "C", "POSIX", and "", which resolves to "C". Names like de_DE.UTF-8, en_US.UTF-8, and fr_FR.UTF-8 aren't available on the device. std::locale("de_DE.UTF-8") throws an exception with the message collate_byname<char>::collate_byname failed to construct for de_DE.UTF-8, and setlocale returns NULL. In the Simulator and in Mac Catalyst, those names work.
To help me reproduce what you're seeing, could you post:
- the platform and OS version, and whether it's a device or the Simulator
- the exact locale name you pass
- the name of a symbol that fails, and what
systemImageNamed:returns for it - a small project or code snippet that shows the problem, if you can share one