Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 11 CFLocaleCopyCurrent console error

Tags:

xcode

xcode11

Just installed Xcode 11.0 beta (11M336w), and once running an empty app getting this console error:

[general] CFLocaleCopyCurrent() failed to look up current locale via 'AppleLocale' and 'AppleLanguages' in user preferences; falling back to locale identifier 'en_US' as the default. Consider checking Console for sandbox violations from this process for reading from preferences, or enabling CoreFoundation debug logging for more information. This will only be logged once.

I'm pretty sure it's irrelevant, but worth mentioning that the empty app uses SwiftUI

like image 345
Amir Rezvani Avatar asked Jun 06 '19 00:06

Amir Rezvani


Video Answer


1 Answers

When I got this error with SwiftUI it was because I forgot to set my view's EnvironmentObject with .environmentObject(). The stated error is completely irrelevant, but making that change fixed it for me. Still a bug with Xcode 11 showing the wrong error, but potentially means there's legitimately an error in your code.

like image 174
RPatel99 Avatar answered Nov 15 '22 23:11

RPatel99