-
Notifications
You must be signed in to change notification settings - Fork 822
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
Fix localized *.intentdefinition have to be added to build source phases #720
Conversation
path: filePath, | ||
fileReference: variantGroup, | ||
buildFile: PBXBuildFile(file: variantGroup), | ||
buildPhase: .resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous implementation, all files under *.lproj
are treated as Resources
. However, they should be generated by generateSourceFile
function.
Note that depending on what type of intents you're setting up you may prefer this to be in the resources phase and not the compile sources phase because you may not want generated code from this. |
If you want to treat them as Resources, you can specify sources:
- path: Sources/Intents.intentdefinition
buildPhase: resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks correct to me
Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @giginet. I've left a couple of comments. Can you also add a localized intent definition to the TestProject
fixture. Would you be able to do a followup PR, sorry for the late review
@@ -11,6 +11,7 @@ | |||
- Improved variable expansion runtime [#704](https://github.com/yonaskolb/XcodeGen/pull/704) @rcari | |||
- Fixed missing headers for static framework targets [#705](https://github.com/yonaskolb/XcodeGen/pull/705) @wag-miles | |||
- Using more file types from XcodeProj for PBXFileReferences resulting in less project diffs [#715](https://github.com/yonaskolb/XcodeGen/pull/715) @yonaskolb | |||
- Fixed localized *.intentdefinition have to be added to build source phases [#720](https://github.com/yonaskolb/XcodeGen/pull/720) @giginet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This * can make anything following render incorrectly in Markdown. Please wrap in `
@@ -81,8 +81,8 @@ class SourceGenerator { | |||
_ = try getSourceFiles(targetType: .none, targetSource: TargetSource(path: path), path: fullPath) | |||
} | |||
|
|||
func generateSourceFile(targetType: PBXProductType, targetSource: TargetSource, path: Path, buildPhase: TargetSource.BuildPhase? = nil) -> SourceFile { | |||
let fileReference = fileReferencesByPath[path.string.lowercased()]! | |||
func generateSourceFile(targetType: PBXProductType, targetSource: TargetSource, path: Path, buildPhase: TargetSource.BuildPhase? = nil, fileRefenrece: PBXFileElement? = nil) -> SourceFile { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo fileRefenrece
Nicely done @giginet! Looking forward to seeing this in an upcoming release! 🚀 |
The above comments have been resolved on master 👍 |
localised .intentdefinition to sources does not work · Issue #614 · yonaskolb/XcodeGen
closes #614
Problem
In the situation, the project has localized
*.intentdefinition
, they have to be added toCopy Bundle Resources
phase instead ofCompile Sources
phase.Description
Localized
*.intentdefinition
should beSources
. However, the current implementation treats asResources.
This PR makes the issue to fix.