Export Localizations Build Error on Specific Pod's Umbrella.h File

Hello,

I am reaching out as I have encountered a problem while working with Xcode (versions 1.4.3 and 1.4.3.1), targeting iOS 16, that has me stumped.

I currently have a project with multiple targets, all of which build successfully under normal circumstances. However, when I try to export localizations, I encounter build errors specifically related to a pod's umbrella.h header file. I want to stress that no such issues occur during regular builds for any of my targets.

Given the nature of the error, I am wondering if there are specific flags or settings that are applied during the build process for exporting localizations that could potentially differ from a regular build. If there are, could these differences account for the discrepancies I am witnessing in terms of the success of the regular build versus the failure of the export localizations process?

I would greatly appreciate any insights or guidance on how to resolve this. If anyone has encountered a similar issue or knows of any differences in the build process when exporting localizations, I'd be thankful for your input.

Thank you in advance for your time and help.

Hello again,

I want to clarify my previous post. Despite the export localizations error related to a pod's umbrella.h file, the pod itself builds successfully. The issue seems to be with my application's source files, which can't find this file only during export localizations, despite successful regular builds. Any insight appreciated.

Thanks again!

Unfortunately, I have the same issue using Xcode 14.3 and also tried the latest Xcode 15 beta (5 I think it is) with no difference in results. Really frustrating trying to work out what the issue is. I hope someone else has some insight.

Accepted Answer

Solved my issue. Apparently, each pod target must define a module, and this setting is not turned on by default. Not sure why this is only required for string export.

I adjusted my Podfile by adding a post-install hook and changing the Pods project setting to YES, then re-running pod install. After that, I was able to export strings for localization without issue and all other builds continue to work just fine.

Hope this helps.

post_install do |pi|
  pi.pods_project.build_configurations.each do |config|
    config.build_settings['DEFINES_MODULE'] = 'YES'
  end
end

Ok, so that post install hook doesn't work. I checked my project and target(s) settings and I have Defines Module set to YES for project, all targets and all pods. Unfortunately I don't know what build settings are used when exporting localizations so I can't change it. If I do a release build or a debug build of all my targets it works with no errors, so why doesn't exporting localization work as well?

The only way I have been able to get this to work is to make start removing targets until it works and then put them back. There's got to be a better way.

Does any one know how to see the build settings used when exporting localizations?

I have a ton of issues Importing and Exporting Localisation files, and have burnt too many evenings ! I usually resort to the XCode command line , that seems pretty reliable ....
I do a clean build maybe -SkipMacroValidation helps I cant recall !

/usr/bin/xcodebuild -sdk iphoneos -skipMacroValidation -configuration Debug -workspace my.xcworkspace -scheme myScheme  build CODE_SIGNING_ALLOWED=NO

Then an Import or export

/usr/bin/xcodebuild -sdk iphoneos -configuration Release -workspace my.xcworkspace -scheme myScheme -importLocalizations -localizationPath path-to/my.xcloc CODE_SIGNING_ALLOWED=NO
Export Localizations Build Error on Specific Pod's Umbrella.h File
 
 
Q