Created
January 25, 2017 11:36
-
-
Save sharpred/d7d049e80ba82dbbf0451e5ae3dc2f47 to your computer and use it in GitHub Desktop.
use cocoapods xcodeproj gem to add a file to your xcode project from the command line
This file contains 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 = "./platforms/ios/helloWorld.xcodeproj" | |
project = Xcodeproj::Project.open(project_path) | |
#add the bundle as a reference | |
bundle_path = "../../includes/OTABundle.bundle" | |
bundleRef = project.new_file(bundle_path); | |
# Get the `copy files` build phase | |
buildphase = project.objects.select{|x| x.class == Xcodeproj::Project::Object::PBXResourcesBuildPhase}[0]; | |
#add the bundle to the build phase | |
buildphase.add_file_reference(bundleRef); | |
project.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment