-
-
Save ndagrawal/5afef1d6ab6123a5729a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'xcodeproj' | |
project_path = "your_project_path"; | |
# Create project object | |
project = Xcodeproj::Project.new(project_path); | |
lib_path = "your_lib_path"; | |
# Add the lib file as a reference | |
libRef = project.new_file(lib_path, "Frameworks"); | |
# Get the build phase | |
framework_buildphase = project.objects.select{|x| x.class == Xcodeproj::Project::Object::PBXFrameworksBuildPhase}[0]; | |
# Add it to the build phase | |
framework_buildphase.add_file_reference(libRef); | |
# Save the project | |
project.save_as(project_path); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment