1

I have something like

NSLocalizedString(@"key", 
                  @"comments in "
                  @"multiple lines")

in one of my files and when I attempt to export the project that contains the file via

xcodebuild -exportLocalizations -localizationPath <dirpath> -project <projectname> [[-exportLanguage <targetlanguage>]]

I get an error message like this:

Bad entry in file <file_name>.m (line = 35): Argument is not a literal string.

In my experiment, this issue goes away when I make the comment a single line literal.

Has anyone experienced a similar problem and knows more about what is going on here? Xcode's other tool for localization, genstrings, seems to handle this fine.

2
  • Just for clarification, I am running Xcode 6.4.
    – dfujiwara
    Sep 1, 2015 at 8:42
  • So the error tells you exactly what is going on, and you have found the way to address it. Not sure what you are asking. You could also use stringByAppendingString: here, of course. Sep 1, 2015 at 16:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.