← All posts

August 14, 2025

Adding a New Target? Don’t Forget These Two Files

Xcode iOS

Adding a New Target? Don’t Forget These Two Files

When working on multi-target iOS/macOS projects, adding a new target often means reconfiguring resources and build settings. However, there are two files that are easy to overlook. Forgetting to include them in the new target can lead to missing localizations and broken user-facing text:

  • Localizable.xcstrings
  • InfoPlist.xcstrings

1. What These Files Do

  • Localizable.xcstrings
    Stores localized strings used in your project via NSLocalizedString and similar APIs.
    If this file isn’t included in the new target, localized text will be missing at runtime—users will see raw keys or fallback language instead.

  • InfoPlist.xcstrings
    Stores localized values for keys in Info.plist, such as the app name (CFBundleDisplayName) and permission descriptions (NSCameraUsageDescription, NSMicrophoneUsageDescription, etc.).
    Without it, system-level text won’t change when the device language changes, creating an inconsistent user experience.

2. Why It’s Easy to Forget

When you create a new target in Xcode, it will generate a new Info.plist file but will not automatically include .xcstrings files in the target’s resource membership.
Even if your project already has localization resources, the new target won’t inherit them—you must manually add them.

3. How to Add Them Correctly

  1. In Xcode’s Project Navigator, locate Localizable.xcstrings and InfoPlist.xcstrings.
  2. Select each file and open the File Inspector on the right.
  3. Under Target Membership, check the box for your new target.
  4. Clean and rebuild the project to confirm the new target can read the localized strings.

💡 Pro Tip:
If you manage multiple targets, make it a habit to check .xcstrings target membership right after creating a new target to avoid debugging missing translations later.

4. Common Pitfalls

  • App name doesn’t localize
    Likely because InfoPlist.xcstrings isn’t included in the target.
  • UI partially appears in the wrong language
    Usually caused by Localizable.xcstrings not being added to the target.
  • Issue only occurs on certain devices
    Can happen if the target is platform-specific (iOS/macOS) and .xcstrings membership is inconsistent.

5. Summary

Whether you’re building region-specific features or packaging for different platforms, manually adding Localizable.xcstrings and InfoPlist.xcstrings to the new target’s membership should be a checklist item every time you create a new target.
It’s a small step that can prevent major localization bugs and keep your user experience consistent.