Anyone having trouble getting "Export Localizations" to build complex projects?

Running on a Core i9 MacBook Pro with macOS 13.4 (22F66) and the Xcode 15 beta. Running "Export Localizations" seems to work fine with smaller projects, but in my larger project, it's not working unless I do a "Clean" first.

The way my project is set up is that the main project depends on a few dynamic frameworks built from other Xcode projects which are incorporated into the main project and set as dependencies.

What happens is that I'm getting the error "Unable to build project for localization string extraction. See the build logs for failure description." In the logs, I see that the Link (x86_64) step succeeds, but the Link (arm64) step fails, with a Could not find or use auto-linked framework 'MyFramework' message for each framework dependency that's in another Xcode project. This would suggest that the dependencies are being built only for x86_64. If I clean the project, the "Export Localizations" will then succeed, but if I do a regular build again, "Export Localizations" goes back to being broken.

What I think is happening is that the "Export Localizations" workflow is using the same binaries as Debug builds, and leveraging any existing Debug builds that happen to exist instead of rebuilding them, but it's also trying to build for all supported architectures whereas a Debug build usually only builds the current one. This, of course, causes a failure to link to dependent libraries/frameworks, since they don't have binaries for the non-active architecture.

Is there any way to turn off building for all architectures for the "Export Localizations" workflow? I don't think it's necessary just for localizations TBH.

  • I have a complex project with > 10 targets and also have issues with exporting localizations. Using Xcode 15. All my targets build in both DEBUG and RELEASE mode. It is only when I try to export localizations that it breaks. The error is always cannot find UIKit. Cleaning the project and deleting derivedData folder has not worked for me. It would be ideal if I could do an export localization for a specified target only

Add a Comment

Replies

Wow, great catch! Please send this bug report to us directly via Feedback Assistant.

If you could, including a sample project and build transcript in the report would help us diagnose the problem. And please include the FB# here once you have one, thanks!

Oddly enough I haven't been able to get it to do it with a minimal test case yet. It must be something about my gargantuan project :-/

I went ahead and submitted the report as FB12287778 anyway, because I really do think that just making localization only compile the active architecture would be more efficient anyway. I may try a few more times to get a test case made over the weekend, but time is tight.

Also: I don't know if Apple engineers have edit access, but if you do, and if you could fix that "compex" typo in the thread title, I'd greatly appreciate it. :-)

  • Thanks for filing FB12287778. Oh, and I fixed the thread title (-:

Add a Comment

I am having the same issue. I cannot find FB12287778 in the Feedback tool. Are there any workarounds?