Parse Cocoapod breaks localization

一世执手 提交于 2019-12-23 18:04:15

问题


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 :

  1. Update your pods : pod update
  2. Clean your project in Xcode : Cmd + K
  3. Clean your project folder : Cmd + Shift + K
  4. Remove the app from the device / simulators
  5. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!