Skip to content

Instantly share code, notes, and snippets.

@Seasons7
Created March 16, 2013 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Seasons7/5177321 to your computer and use it in GitHub Desktop.
Save Seasons7/5177321 to your computer and use it in GitHub Desktop.
add file in subgroup
from mod_pbxproj import XcodeProject
if __name__ == '__main__':
proj = XcodeProject.Load('test01.xcodeproj/project.pbxproj')
test01 = proj.get_or_create_group("test01")
resources = proj.get_or_create_group("Resources", parent=test01)
proj.add_file("hoge/a.txt", parent=resources)
proj.backup()
proj.save()
@Seasons7
Copy link
Author

@Seasons7
Copy link
Author

hoge/a.txt is local file.

like this.

test01.xcodeproj
+test01
+hoge

  • a.txt

addFile.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment