GithubHelp home page GithubHelp logo

classicvalues / xcodeproj-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cocoapods/xcodeproj

0.0 1.0 0.0 3.87 MB

Create and modify Xcode projects from Ruby.

Home Page: http://rubygems.org/gems/xcodeproj

License: MIT License

Ruby 100.00%

xcodeproj-1's Introduction

Xcodeproj

Build Status Maintainability Test Coverage

Xcodeproj lets you create and modify Xcode projects from Ruby. Script boring management tasks or build Xcode-friendly libraries. Also includes support for Xcode workspaces (.xcworkspace), configuration files (.xcconfig) and Xcode Scheme files (.xcscheme).

It is used in CocoaPods to create a collection of supplemental libraries or frameworks, for all platforms Xcode supports.

The API reference can be found here.

Installing Xcodeproj

Xcodeproj itself installs through RubyGems, the Ruby package manager. Install it by performing the following command:

$ [sudo] gem install xcodeproj

Quickstart

To begin editing an xcodeproj file start by opening it as an Xcodeproj with:

require 'xcodeproj'
project_path = '/your_path/your_project.xcodeproj'
project = Xcodeproj::Project.open(project_path)

Some Small Examples To Get You Started

Look through all targets

project.targets.each do |target|
  puts target.name
end

Get all source files for a target

target = project.targets.first
files = target.source_build_phase.files.to_a.map do |pbx_build_file|
	pbx_build_file.file_ref.real_path.to_s

end.select do |path|
  path.end_with?(".m", ".mm", ".swift")

end.select do |path|
  File.exists?(path)
end

Set a specific build configuration to all targets

project.targets.each do |target|
  target.build_configurations.each do |config|
    config.build_settings['MY_CUSTOM_FLAG'] ||= 'TRUE'
  end
end
project.save

Command Line Tool

Installing the Xcodeproj gem will also install a command-line tool xcodeproj which you can use to generate project diffs, target diffs, output all configurations and show a YAML representation.

For more information consult xcodeproj --help.

Collaborate

All Xcodeproj development happens on GitHub. Contributing patches is really easy and gratifying.

Follow @CocoaPods to get up to date information about what's going on in the CocoaPods world.

LICENSE

These works are available under the MIT license. See the LICENSE file for more info.

xcodeproj-1's People

Contributors

fabiopelosin avatar segiddins avatar alloy avatar dnkoutso avatar mrackwitz avatar neonichu avatar endocrimes avatar kylef avatar alisoftware avatar amorde avatar thiagohmcruz avatar benasher44 avatar pbernery avatar lukeredpath avatar orta avatar simonseyer avatar igor-makarov avatar heyzooi avatar 0xced avatar revolter avatar rbsgn avatar ashton-w avatar somedev avatar emkosz avatar jkap avatar banjun avatar louisdh avatar cjwirth avatar bclymer avatar dev4dev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.