Closed pbartolome closed 10 years ago
This is expected in the design. As I do not know how to convert back from json to binary format (a.k.a the format you posted ) of the project file, the script just scan the binary format file line to line to do the replacement and delete operation.So that's the result you got. Adding the support to the entire section in binary format is too complicated, and I have no plans for the moment.
But why the entire group is not deleted by Xcode if they do not exist any more? PBXVariantGroup describes a group of files that act like one. How would it exist without any contents inside?
I don't know why xcode is not deleting those files, but InfoPlist.strings, Main_iPhone.storyboard and Main_iPad.storyboard are not there anymore on the project. I tried deleting manually the whole section, the project works fine as well as the script.
I was using on the project for the first time the options xUnique.py -s -p -u
. On this case, If it's going line by line to modify or delete, probably it will need to delete the whole multi line entry
92F3CD8218DC7D9E004F2CC6 /* Main_iPad.storyboard */ = {
isa = PBXVariantGroup;
children = (
92F3CD8318DC7D9E004F2CC6 /* Base */,
);
name = Main_iPad.storyboard;
sourceTree = "<group>";
};
Instead of just removing one line with an opening bracket XXXX /* entry */ = {
and not removing the rest of the entry up to the closing bracket };
isa = PBXVariantGroup;
children = (
);
name = Main_iPad.storyboard;
sourceTree = "<group>";
};
I know that this will probably require parsing the binary, and maybe a huge effort, on this case I was expecting a warning, the whole entry deleted or the entry left untouched. Just a suggestion, but anyway, the script is really good! great job.
OK,I will add messages when removing lines in normal mode.
— Sent from my mobile phone
On Sat, Oct 18, 2014 at 12:54 AM, Pablo Bartolome notifications@github.com wrote:
I don't know why xcode is not deleting those files, but InfoPlist.strings, Main_iPhone.storyboard and Main_iPad.storyboard are not there anymore on the project. I tried deleting manually the whole section, the project works fine as well as the script. I was using on the project for the first time the options
xUnique.py -s -p -u
. On this case, If it's going line by line to modify or delete, probably it will need to delete the whole multi line entry92F3CD8218DC7D9E004F2CC6 /* Main_iPad.storyboard */ = { isa = PBXVariantGroup; children = ( 92F3CD8318DC7D9E004F2CC6 /* Base */, ); name = Main_iPad.storyboard; sourceTree = "<group>"; };
Instead of just removing one line with an opening bracket
XXXX /* entry */ = {
and not removing the rest of the entry up to the closing bracket};
isa = PBXVariantGroup; children = ( ); name = Main_iPad.storyboard; sourceTree = "<group>"; };
I know that this will probably require parsing the binary, and maybe a huge effort, on this case I was expecting a warning, the whole entry deleted or the entry left untouched. Just a suggestion, but anyway, the script is really good! great job.
Reply to this email directly or view it on GitHub: https://github.com/truebit/xUnique/issues/13#issuecomment-59542255
I found out that my project file had some references to old files on the PBXVariantGroup. Those files are not in the project anymore. The script is removing the ID and file name instead of leaving or removing the whole entry. The output is a corrupted project that xcode is unable to open
Original:
Script Output: