Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Is there a way to avoid generating InfoPlist.xcstrings for framework targets?

Xcode automatically generates an InfoPlist.xcstrings file for all targets, even framework targets. In frameworks, this doesn't include any user-facing content - it only has the bundle name and the copyright string. But neither of these are going to be used by users.

Is there a way to tell Xcode that it doesn't need to generate these xcstrings files for content that is not user-facing?

Answered by Developer Tools Engineer in 844459022

Hello,

Xcode knows that these keys in frameworks are typically not displayed to the user, so it automatically marks them as “Don’t Translate”. This way, they can still be translated if needed by removing the “Don’t Translate” status.

When exporting to an xcloc/XLIFF file, the <trans-unit> element will have the translate="no" attribute to indicate this. That attribute can be removed by the developer or translator if it turns out it does need to be translated (for example because the CFBundleName is being manually looked up and displayed by the framework code).

Hello,

Xcode knows that these keys in frameworks are typically not displayed to the user, so it automatically marks them as “Don’t Translate”. This way, they can still be translated if needed by removing the “Don’t Translate” status.

When exporting to an xcloc/XLIFF file, the <trans-unit> element will have the translate="no" attribute to indicate this. That attribute can be removed by the developer or translator if it turns out it does need to be translated (for example because the CFBundleName is being manually looked up and displayed by the framework code).

Hm. That sounds like a decent solution, but that hasn't been my experience in the past. I'll have to check whether that's what's happening.

Is there a way to avoid generating InfoPlist.xcstrings for framework targets?
 
 
Q