-
Notifications
You must be signed in to change notification settings - Fork 750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R.swift usage causes build error when running xcodebuild -exportLocalizations
#889
Comments
xcodebuild -exportLocalizations
xcodebuild -exportLocalizations
After I have revisited the build logs of an export through the UI option, I found an easy workaround: This way there is no build required. Documentation: https://developer.apple.com/documentation/xcode/build-settings-reference#Use-Compiler-to-Extract-Swift-Strings |
Hey folks,
we are using R.swift in our codebase to access all localized strings. Now we are trying to export our localizations via the
xcodebuild -exportLocalizations
command.Unfortunately it cannot build the project, since it always fails with a
cannot find 'R' in scope
error for each usage ofR.string.<...>
. However, the error only occurs if we are using thexcodebuild -exportLocalizations
command directly. If we use the UI option via Product -> Export Localizations, the export works just fine.I have created a demo project replicating the issue: https://github.com/finebel/LanguageSample
It seems like the
RswiftGenerateInternalResources
build tool plugin isn't executed if I usexcodebuild -exportLocalizations
and the previously (during a normal build) generatedR.generated.swift
file is not used.Has anyone experienced something similar or has an idea what the problem might be? Any help is appreciated!
The text was updated successfully, but these errors were encountered: