xcstrings-tool
xcstrings-tool copied to clipboard
Prevent symbol conflicts when using `accessLevel: public` across multiple packages
trafficstars
Describe the problem
When using XCStringsToolPlugin across multiple Swift packages, setting accessLevel: public in just one package's xcstrings-tool-config.yml causes a conflict if other packages also generate a Localizable symbol (even with default internal access level).
The compiler reports:
'Localizable' is ambiguous for type lookup in this contextThis happens because one module exports
Localizablepublicly, while others still generate the same symbol internally — leading to ambiguity when multiple modules are imported into the same target.
Steps to Reproduce
- Add
.xcstringsfiles to two Swift packages:PackageAandPackageB - Set
accessLevel: publicinPackageA’s config only - Leave
PackageBwith default orinternal - Import both packages into an app target
- Use
Localizable.someString