You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subprojects in Xcode look like PBXFileReferences to Xcodeproj. So they should be removable in the same way as a regular file, by calling remove_from_project.
Unfortunately, this doesn't work.
project=Xcodeproj::Project.open('MyProject.xcodeproj')project.objects.eachdo |object|
ifobject.respond_to?(:name) && object.name == "MySubProject.xcodeproj"putsobject.path# => object is there and has the correct pathobject.remove_from_projectendendproject.save
Output:
../../MySubProject.xcodeproj
/usr/local/opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project/object_dictionary.rb:113:in `block in to_hash': undefined method `uuid' for nil:NilClass (NoMethodError)
from /usr/local/opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project/object_dictionary.rb:113:in `each'
from /usr/local/opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project/object_dictionary.rb:113:in `to_hash'
from /usr/local/opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project/object.rb:373:in `block (2 levels) in to_hash'
from /usr/local/opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project/object.rb:373:in `map'
from /usr/local/opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project/object.rb:373:in `block in to_hash'
from /usr/local/opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project/object.rb:371:in `each'
from /usr/local/opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project/object.rb:371:in `to_hash'
from /usr/local/opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project.rb:240:in `block in to_hash'
from /usr/local/opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project.rb:240:in `each'
from /usr/local/opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project.rb:240:in `to_hash'
from /usr/local/opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/xcodeproj-0.17.0/lib/xcodeproj/project.rb:303:in `save'
from ./test.rb:14:in `<main>'
Doing the same thing with a regular file saves without a hitch. Any thoughts?
The text was updated successfully, but these errors were encountered:
Subprojects in Xcode look like
PBXFileReference
s to Xcodeproj. So they should be removable in the same way as a regular file, by callingremove_from_project
.Unfortunately, this doesn't work.
Output:
Doing the same thing with a regular file saves without a hitch. Any thoughts?
The text was updated successfully, but these errors were encountered: