12

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

Cœur
  • 37,241
  • 25
  • 195
  • 267
Amir
  • 9,577
  • 11
  • 41
  • 58

3 Answers3

2

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.

RPatel99
  • 7,448
  • 2
  • 37
  • 45
0

I faced the same error, closing and opening the Xcode fixed it for me.

0

I got this same error with SwiftUI running in simulator. I solved it just by changing the region from Setting -> General -> Language & Region -> Region to India.

Vinoth Vino
  • 9,166
  • 3
  • 66
  • 70