Unable to build project for localization string extraction

The project can be successfully built and run. But when I export for localization, it shows this error message: Unable to build project for localization string extraction

Searched on google but nothing found.

Replies

When exporting your project for localization, all targets in your project are built to extract localizable content. It's possible one of these targets is failing to build. You can use the log viewer in Xcode to see and fix the build failure.

If you'd like to disable a specific target from exporting localizations, you can disable the "Localization Export Supported" build setting.

  • That's it. I had the same problem of OP and discovered that there was a build error in some target. It worked after fix it, thanks!

  • Solve my issue!

  • Exporting and importing worked exactly once for me, then it stopped working. Disabling "Localization Export Supported" doesn't help. Wy not just import the .xliff files? I'm starting to regret moving to Strings Dicts.

Add a Comment

Same for me, but cannot solve the error:

  • My app has one target only, based on SwiftUI
  • In some files I'm using OBJC from UIKit, no problem, app compiles and works well
  • When exporting localizations, compiler aborts with "error: no such module 'UIKit'"

I don't understand what I should do to solve this. Obviously it finds UIKit, as the app runs fine. Why does exporting localisation not find it? How can I fix it?

  • @icape, I have the same issue. All of my targets build correctly using Command B, as well as archiving them, however export localization fails, complaining that my source code cannot compile due to a missing -umbrella.h file of a specific pod of mine. Need to know what flags are passed to the export localization's build process

Add a Comment

Same issue for me. But I have Xcode project with package.

I have the same issue and as figured it out some of my pods installed by Cocoapods causing it, because for example when I deleted Firebase pods, "Export Localizations" build worked fine. But still I don't know how to fix it by keeping needed pods

Exporting and importing worked exactly once for me, then it stopped working for no apparent reason. No changes were made in the project settings. Disabling "Localization Export Supported" doesn't help. It seems Xcode has some issue with a subproject that doesn't even include any localization.

I'm going to have to spend a week importing hundreds of strings in 10 different languages manually.