Xcodeproj
Xcodeproj copied to clipboard
TargetAttributes is not being updated in project.pbxproj
Hi, I wrote a script to delete some targets and create some build configurations. The script works fine but the TargetAttributes from project.pbxproj
is not being updated. I realized that if I use Xcode after running the script and do something insignificant the file is updated and everything is okey, but I want to avoid that step. Is there any command to update the project.pbxproj
file? Something like clean
format
or something like that?
Is there any command to update the project.pbxproj file?
Do you mean using Xcodeproj::Project.open(...)
instead of .new(...)
?
Yes, I used Xcodeproj::Project.open(...)
it might be a bug that TargetAttributes is not updated. Will have to make a change and add a test for it.
And the target folders are not being deleted neither. I had to deleted in other script not with this gem. How much time would take to fix this? Thanks
I do not know how long it would take unfortunately. It all depends on the change. I personally don't have time to look into this right now.
Generally we want to follow as much as possible what Xcode does so if there is something from deleting a target that Xcodeproj doesn't do that Xcode now does then we need to update it here.
And is there a way to update the project or to make a clean or something like that or not?
You probably have enough information/api methods to do this as a follow up in your script yes.
I deleted doing this:
target_atts_obj = project.root_object.attributes['TargetAttributes']
target_atts_obj.delete(target.uuid)