node-xcode
node-xcode copied to clipboard
addLocalizationVariantGroup results in 'undefined' comment
Adding localization variant groups always adds groups with comment "undefined". For example, I end up with a PBXBuildFile
section entry like this:
4815039DEE524DBD9A7F16E8 /* Localizable.strings in undefined */ = {isa = PBXBuildFile; fileRef = E651D27D6DE74EDFB6FCD625 /* Localizable.strings */; };
Looks like the cause of this is pbxProject.addLocalizationVariantGroup: line 1864
Here, the variant group object is created without a group. This object is then passed in to this.addToPbxBuildFileSection(localizationVariantGroup)
. This then passes the group into pbxBuildFileComment(file)
, which in turn calls longComment(file)
, which sets the comment for this entry.
longComment
returns f("%s in %s", file.basename, file.group)
as file comment. Thus, not setting the group property when the variant group is created results in all variant groups being created with this method having undefined
comment.
The group property in this case refers to the build phase. Since localized resources are always added to the 'Resources' build phase, setting that when the variant group is being created should fix this issue.
@innovative1 Could you send a pull request for this?