问题
I've installed REActivityViewController
as a pod. Here's the picture of the Resources
folder in the pod:
And here's one of the lines trying to pull the strings:
[_cancelButton setTitle:NSLocalizedStringFromTable(@"button.cancel", @"REActivityViewController", @"Cancel") forState:UIControlStateNormal];
The button titles come out not-localized. In this example it shows button.cancel
. It's also not just this button title but all the buttons in this dependancy.
EDIT
So in my Main Project under Info
there's this. I can't click it to see what files those are. I have NSLocalizedStrings
in my main project but I have yet to create a .strings
files out of them:
EDIT
So I checked my Pods-resources.sh
and found this:
install_resource "REActivityViewController/REActivityViewController/REActivityViewController.bundle"
install_resource "REActivityViewController/REActivityViewController/Localizations/de.lproj"
install_resource "REActivityViewController/REActivityViewController/Localizations/en.lproj"
install_resource "REActivityViewController/REActivityViewController/Localizations/fr.lproj"
install_resource "REActivityViewController/REActivityViewController/Localizations/it.lproj"
install_resource "REActivityViewController/REActivityViewController/Localizations/ru.lproj"
install_resource "REActivityViewController/REActivityViewController/Localizations/uk.lproj"
install_resource "REActivityViewController/REActivityViewController/Localizations/zh-Hans.lproj"
回答1:
OK, I figured this out and it looks like it was somewhat isolated. I had checked the box Run script only when installing
under Target -> Copy Pods Resources, because the script were painfully slow, so the script to install the bundle wasn't installing the bundle while debugging.
来源:https://stackoverflow.com/questions/21692953/nslocalizedstringfromtable-not-working-in-cocoapod-dependency