Skip to content

Instantly share code, notes, and snippets.

@michaeleisel
Created February 28, 2019 19:10
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 michaeleisel/151f0d6388b76b71f8cae4ee35a6df0f to your computer and use it in GitHub Desktop.
Save michaeleisel/151f0d6388b76b71f8cae4ee35a6df0f to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
raise "Usage: ./framework.rb <path to pbxproj file> <name of target>" unless ARGV.size == 2
proj_file, name = ARGV
str = IO.read(proj_file).gsub("com.apple.product-type.application", "com.apple.product-type.framework").gsub("#{name}.app", "#{name}.framework")
IO.write(proj_file, str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment