问题
In an iOS project, I've updated this morning my pods to add a new one. The Parse iOS SDK also got updated in the process, and it seems like it broke my app's localization.
Now, when I try to call NSLocalizedString(@"A_LOCALIZED_STRING", nil)
, I always get @"A_LOCALIZED_STRING"
in return.
Even if I use the longer version of NSLocalizedString
with a specific bundle (here, [NSBundle mainBundle]
), I get the same results.
I've noticed that the only string that gets localized properly is the string @"OK"
, which precisely is the only string specified in Parse SDK's Localizable.strings file.
My interpretation is that this pod's Localizable.strings is somewhat overriding my own. Is that even possible? How to workaround this?
Thanks!
(I must also add that localization in my project used to work flawlessly until now, so it's not a first-time configuration problem.)
回答1:
I think they just realeased a fix (1.8.0.1).
You'll have to :
- Update your pods :
pod update
- Clean your project in Xcode : Cmd + K
- Clean your project folder : Cmd + Shift + K
- Remove the app from the device / simulators
- Run your project
Yes, thank's Parse, we're really glad to loose half a day to solve the problem your made appear just by localizing one of the most useless word to localize, "OK".
回答2:
Absolut mental bug, banged my head against a wall for two days.
Also don't forget to clean (shift + cmd + k) your project and do a fresh install of your app after updating parse.
来源:https://stackoverflow.com/questions/32015489/parse-cocoapod-breaks-localization