2

In order to test localisation, I have an Xcode scheme configured to specify simulator locale settings. The scheme appears as follows:xcode scheme arguments

-AppleLocale $(LANG)_$(COUNTRY)
-AppleLanguages ($(LANG))

Passing the above arguments to the simulator has the desired effect if LANG and COUNTRY are defined as build settings in the target.

xcode target build settings

For convenient automation, I'd like to be able to override the build settings from xcodebuild. However, when I run the following to override the target build settings, the locale of the simulator remains unchanged.

xcodebuild test -workspace MyApp.xcworkspace -scheme 'App UI Tests' -destination 'name=iPad Air' LANG=es COUNTRY=ES

It seems the default build settings from the target are used, regardless of any overrides specified at the terminal.

As an alternative, I could specify the locale code directly in the scheme. Then I could duplicate the scheme for every locale. It seems like a lot of duplication, but perhaps it is more the intended usage of schemes.

Am I missing something? Is this a feature of schemes by design, or could it be an issue with Xcode?

user2320264
  • 53
  • 1
  • 5

0 Answers0