GithubHelp home page GithubHelp logo

yonaskolb / xcodeproj Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tuist/xcodeproj

6.0 3.0 0.0 11.86 MB

Swift library for parsing Xcode projects

License: MIT License

Swift 98.53% C 0.21% Ruby 1.26%

xcodeproj's Introduction

Swift Package Manager Twitter: @pepibumur License

xcodeproj is a library written in Swift for parsing and working with Xcode projects. It's heavily inspired in CocoaPods Xcodeproj and xcode.

Motivation πŸ’…

Being able to write command line scripts in Swift to update your Xcode projects configuration. Here you have some examples:

  • Add new Build phases.
  • Update the project Build Settings.
  • Create new Schemes.

Contribute πŸ‘¨β€πŸ‘©β€πŸ‘§

  1. Git clone the repository [email protected]:carambalabs/xcodeproj.git.
  2. Open xcodeproj.xcodeproj

Setup πŸ¦‹

Using Swift Package Manager

Add the dependency in your Package.swift file:

let package = Package(
    name: "myproject",
    dependencies: [
        .Package(url: "https://github.com/carambalabs/xcodeproj.git", majorVersion: 0, minor: 0)
    ]
)

Using Marathon

Edit your Marathonfile and specify the dependency in there:

https://github.com/carambalabs/xcodeproj.git

How to πŸ’

Read

You can read the Xcode project files as shown in the examples below:

// Read a project
let project = try! XcodeProj(path: "myproject.xcodeproj")
let pbxproj = project.pbxproj
let buildFiles = pbxproj.objects.buildFiles
let buildConfigurations = pbxproj.objects.buildConfigurations

// Read a workspace
let workspace = try! XCWorkspace(path: "myworkspace.workspace")
let projects = workspace.data.references.map { $0.project }

// Read a config file
let xcconfig = try! XCConfig(path: "MyConfig.xcconfig")
let buildDir = xcconfig.buildSettings("CONFIGURATION_BUILD_DIR")

Write

All models above are also writable. After modifying them you can write them back to disk:

pbxproj.write(override: true)
xcconfig.write(override: true)

Documentation πŸ“„

You can check out the documentation on the following link. The documentation is automatically generated in every release by using Jazzy from Realm.

References πŸ“š

About

This project is funded and maintained by Caramba. We πŸ’› open source software!

Check out our other open source projects, read our blog or say πŸ‘‹ on twitter @carambalabs.

Contribute

Contributions are welcome 🀘 We encourage developers like you to help us improve the projects we've shared with the community. Please see the Contributing Guide and the Code of Conduct.

License

MIT License

Copyright (c) 2017 Caramba

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

xcodeproj's People

Contributors

yonaskolb avatar

Stargazers

Shawn Baek avatar АртСм Π’ΠΎΡ€Ρ…Π»ΠΈΠΊ avatar Amine Bensalah avatar Bohdan avatar Hector De Diego avatar Emma Cold avatar

Watchers

James Cloos avatar Grigor Hakobyan avatar  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.