I'm trying to use the launch arguments such as NSDoubleLocalizedStrings and NSShowNonLocalizedStrings to test localization in my Objective-C project. For some reason I couldn't get neither of them to work. I tried to set both arguments on launch and options in scheme settings:
Also I've checked NSUserDefaults keys and they both are YES. But the arguments still don't work.
To make sure it's not an XCode bug I've created absolutely new single-view project on Objective-C and Swift with one label on the view. Both projects had empty Localizable.strings files and the code in these projects was the following:
@interface ViewController ()
@property (nonatomic, strong) IBOutlet UILabel *label;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.label.text = NSLocalizedString(@"Some text", nil);
}
@end
and
class ViewController: UIViewController {
@IBOutlet var label: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
label.text = NSLocalizedString("Some text", comment: "")
}
}
The result looked like this:
So here are the questions:
1) What could be the reasons launch arguments don't work in my Objective-C project?
2) Why NSDoubleLocalizedStrings argument doesn't work in Swift?
