问题
According to apple documentation, notification payload can carry "loc-key" key which identifies localization string key in app bundle. What will happen if there will be no such key in app's bundle (for instance, when there were updates on the server and new notification types were added)?
回答1:
You will most likely get the default behaviour of NSBundle
's localizedStringForKey:value:table:
method which is to return the key when the value can not be found.
回答2:
You can send your message template in loc-key: "%1$@ won the game" with "John" in loc-args will become "John won the game", though you app doesn't have "%1$@ won the game" in Localizable.strings.
来源:https://stackoverflow.com/questions/16057082/what-if-app-bundle-does-not-contain-a-key-for-the-loc-key-received-in-push-not