NSCurrentLocaleDidChangeNotification on iPhone OS
- by 0xced
While the NSCurrentLocaleDidChangeNotification perfectly makes sense on Mac OS X, I don't see how you can possibly receive it on iPhone OS. In order to change the locale, you have to quit the running application, then change it in Settings ? General ? International ? Region Format. At that point, your app is not running, so how could it receive the notification?
I first thought this notification was leftover from the Mac OS X documentation, but then I found this in Apple Push Notification Service Programming Guide:
The application might send its
provider the preferred language every
time the user changes something in the
current locale. To do this, you can
listen for the notification named
NSCurrentLocaleDidChangeNotification
and, in your notification-handling
method, get the code identifying the
preferred language and send that to
your provider.
So, how do you trigger this notification on iPhone OS?