1
votes

I have an app with two targets. Some localizations supported in one target is not supported in the other. Since in Xcode the localizations are specified on the project level and not on the target level, I need to know how to remove certain languages from each target.

I have tried adding build phase script

rm -r "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/fr.lproj"

but there is no effect. I still see the french localizations when the device is set to french (French should not be supported in this target), I want it to fall back to English localization. Is it possible?

Help would be appreciated.

1
Make sure you're adding the script step after the copy resources step.David Berry
How do i ensure that? In XCode I see this runscript is after "copy bundle resources"Neelesh
Then it's in the right place. In the "Shell" field try adding -xe and double-check the path.David Berry
Also you'll need to both clean in Xcode and remove the application from the target device for the change to take effect. Installing through Xcode just copies the new resources over the existing old resources, it doesn't ever delete anything.David Berry
@David Can you write it as an answer, so I can mark it as correct or approved.Neelesh

1 Answers

3
votes

You'll need to both clean in Xcode and remove the application from the target device for the change to take effect. Installing through Xcode just copies the new resources over the existing old resources, it doesn't ever delete anything.