What's the difference between NSLocale currentLocale vs autoupdatingCurrentLocale? It's not obvious from reading the documentation.
2 Answers
When the user changes their system locale settings, the autoupdating one automatically updates to the new locale.

- 41,261
- 11
- 67
- 84
The currentLocale only retrieve an locale object one time from the current user's settings. autoupdatingCurrentLocale updates the locale object on the fly so you don't need to validate. You might think autoupdateingCurrentLocale is the prefer way, it is per Apple documentation; however, since the returned object may be cached, you don't really need to hold on to it indefinitely when using currentLocale, verse autoupdateingCurrentLocale. If you are using autoupdatingCurrentLocale, note that this API do not cache the locale object, so you will need a way to compute cache upon receipt. One way is to use notification such as NSCurrentLocaleDidChangeNotification method call.

- 31
- 1
-
1Does that mean autoupdating will consume more battery? – Boon May 02 '14 at 01:54
-
I would say that It consume as much as observing a notification. – Blazej SLEBODA Feb 15 '23 at 21:56