Localization Issue with Multiple Build Targets in Xcode - One Target Not Recognizing Localizable.strings File

Hello Apple Developer Community,

I'm experiencing an issue with localization in my Xcode project that has two build targets, "Build X" and "Build Y." Both targets are set up to support the same language, but they each have slightly different wording, which is why I've created separate Localizable.strings files for each build target. Here's an overview of my setup:

Project Structure

I have a Localizable folder with two subfolders:

Localizable/OrdnerX/Localizable.strings (for Build X) Localizable/OrdnerY/Localizable.strings (for Build Y)

Configuration

In the File Inspector, I’ve assigned each Localizable.strings file to its corresponding build target:

OrdnerX/Localizable.strings is linked to Build X OrdnerY/Localizable.strings is linked to Build Y

Under Build Phases, I verified that each build target references the correct Localizable.strings file. The paths are all correctly set, so each target should know where to find its respective localization file.

Problem

When I build and run Build X, everything works perfectly. The app displays the correct localized strings from OrdnerX/Localizable.strings. However, when I switch to Build Y, the app fails to find the localized strings from OrdnerY/Localizable.strings, and I’m left with placeholder text instead. I’ve double-checked the configurations for both build targets multiple times, and they appear identical. The Localizable.strings files for both targets are configured in exactly the same way, but Build Y just doesn’t seem to recognize its assigned localization file.

Has anyone encountered a similar issue, or can anyone suggest potential fixes? I’d appreciate any advice on what might be causing this discrepancy.

Thank you in advance!

Localization Issue with Multiple Build Targets in Xcode - One Target Not Recognizing Localizable.strings File
 
 
Q