mod-pbxproj
mod-pbxproj copied to clipboard
fix: support adding and removing Localizable.strings file
XCode project supports adding Localizable.strings file in multiple variants in which each language gets its own variant with the language code as the file "name" property.
Before
- The file would be added under incorrect Resources section
- The file ID would still be referenced in the Localizable.strings PBXVariantGroup section event though it has been removed
- File cannot have a custom name
After
- The file can be added to the correct group via the
parent
parameter in ProjectFiles.add_file() method - When a file is removed, it's references are removed from both PBXGroup and PBXVariant group sections
- Files can have custom names, differing from its path
- More fixes for the
productRef
issue
TODO
- [x] Fix broken tests
- [ ] Add new tests for the changes
Fun fact
This code is written on Linux, with help from my colleagues to debug the version once it's ready on their iOS devices.
Thanks!
This project has been very helpful for us in openedx/openedx-app-ios. Thanks for creating it and double thanks for your fast triage for the other pull request.