Reputation: 194
I have Xcode project with five targets. All of them are using same resources (mostly images) localized into four languages distributed into *.lproj directories. Is to possible to disable specific localization for one of the targets?
Upvotes: 6
Views: 1698
Reputation: 194
It looks like Xcode is managing localizations by project. There is no way to use different sets of localizations for each target. The only possible way is to remove localization directory from application by using custom "Run script" build phase:
rm -r "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/en.lproj"
I found it in another thread on SO, that discussed different issue related to localizations in iOS projects: Non-English default language for iOS App?
Sorry for answering my own question, but it took couple of days to find a solution that actually works. Maybe it will be useful for someone else.
Upvotes: 9
Reputation: 38142
Yes. Just remove the files from that target. For this, from XCODE select the project and then the specific target on right pane. And then click on "Build Phases" to see "Copy Bundle Resources". Remove the specific item from here and you should be good to go.
Upvotes: 0