Beter late than never.
This happens (at least on my mac) when Scheme -> Run -> Options -> AppLanguage is set to SystemLanguage. Select a specific language and the error goes away. Strange but NSLocale.currentLocale is called for an app set to MacOS 12 deployment target. NSLocale.currentLocale no longer exists in that version.