2

I remember reading somewhere about one of Xcode's features which will cause all strings in your application to appear as double in length, simply by repeating their contents. For example, if a UILabel contains the text Username:, it will now contain the text Username:Username:. I can't find any reference to this on Google. How can I access this feature in Xcode?

The idea is that it can help you debug localization issues, since some languages have very long strings compared to English.

Update: I believe I heard about it in the WWDC 2012 Auto Layout by Example (232) video.

(Search keywords: NSString, double, debug)

Senseful
  • 86,719
  • 67
  • 308
  • 465

1 Answers1

5

DoubleLocalizedStrings

Select your target in the Xcode toolbar and go to "Edit Scheme...", add the launch argument -NSDoubleLocalizedStrings YES Now all of your text that uses NSLocalizedString and its ilk will be doubled.

NeedTungsten
  • 1,148
  • 10
  • 12
  • More info about setting these arguments can be [found here](http://stackoverflow.com/a/13138933/35690). – Senseful Feb 28 '14 at 01:07