Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Using the Xcodeproj Ruby Gem - open exising Xcode project, add a file to the project in the main group, add the file to the main target, and save the Xcode project file.
# Open the existing Xcode project
project_file = product_name + '.xcodeproj'
project =
# Add a file to the project in the main group
file_name = 'Message.m'
group_name = product_name
file = project.new_file(file_name, group_name)
# Add the file to the main target
main_target = project.targets.first
# Save the project file

This comment has been minimized.

Copy link

lolgear commented Feb 25, 2014

Hi! How can I list all files/frameworks that were added to existed project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.