Giter VIP home page Giter VIP logo

xcodeproject's Introduction

XcodeProject

XcodeProject is a library for Xcode utility for read structure and it can be overwrite for`project.pbxproj.
And XcodeProject package has executable library about append and remove files and directory to your xcode project on CLI named by xcp.

About XcodeProject Library

Usage XcodeProject Core Function.

Instanciate XcodeProject class. XcodeProject is necessary edit for project.pbxproj.

// Prepare for your project `project.pbxproj` file path.
let yourProjectPath = "/Users/bannzai/development/iOSProject/iOSProject.xcodeproj"
let pbxPath = yourProjectPath + "/project.pbxproj"
let xcodeprojectFileURL = URL(fileURLWithPath: pbxPath)

// Instanciate `XcodeProject`.
let xcodeproject = try XcodeProject(xcodeprojectURL: xcodeprojectFileURL)

Append file with relative wfile path from iOSProject.xcodeproject directory and build target name.

xcodeproject.appendFile(path: "iOSProject/Repository/UserRepository.swift", targetName: "iOSProject")

Remove file with relative wfile path from iOSProject.xcodeproject directory and build target name.

// append file with file path and build target name. 
xcodeproject.removeFile(path: "Config.swift", targetName: "iOSProject")

If you want overwrite project.pbxproj, You can call xcodeproject.write() method.

// Overwrite in pbxproj.
try xcodeproject.write()

Command Line Tool

Install

Using mint.

$ mint install bannzai/XcodeProject

Usage

Add file

xcp --add-file <FILE_PATH> <BUILD_TARGET_NAME>

$ xcp --add-file iOSProject/Group/A.swift iOSProject.xcodeproj/project.pbxproj iOSProject 

Add group

xcp --add-group <FILE_PATH> <BUILD_TARGET_NAME>

$ xcp --add-group iOSProject/Group/ iOSProject.xcodeproj/project.pbxproj iOSProject

Remove file

xcp --remove-file <FILE_PATH> <BUILD_TARGET_NAME>

$ xcp --remove-file iOSProject/Group/A.swift iOSProject.xcodeproj/project.pbxproj iOSProject 

Remove group

xcp --remove-group <FILE_PATH> <BUILD_TARGET_NAME>

$ xcp --remove-group iOSProject/Group/ iOSProject.xcodeproj/project.pbxproj iOSProject

Used in

Kuri is code generate for iOS CleanArchitecture.

License

XcodeProject is available under the MIT license. See the LICENSE file for more info.

xcodeproject's People

Contributors

bannzai avatar

Stargazers

 avatar Yassine Lafryhi avatar Tsuyoshi Yonemoto avatar Fantasy avatar frankfanslc avatar tatsuaki watanabe avatar mikkame avatar Alberto Garcia avatar Saulo Freire avatar Nikita avatar Lucas Bento avatar  avatar  avatar Tanaka Kenji avatar malillu avatar  avatar Joe Hinkle avatar Nazih Shoura avatar Siddharth Gupta avatar  avatar Takeshi Ihara avatar Takuhiro Muta avatar Micky avatar Daiki Matsudate avatar Inácio Ferrarini avatar  avatar Akisato98 avatar Hideyuki Nanashima avatar wknar avatar Ryoya Ito avatar dddrop avatar Pavlo Boiko avatar koooootake avatar  avatar Wonyoung Ju avatar  avatar Satoshi Yoshio avatar Taiki Suzuki avatar Tomoya Hayakawa avatar  avatar Sungwhee Kim avatar Alessandro Aresta avatar Luciano Almeida avatar Yusuke Kita avatar Anton Van Eechaute avatar lio丶 avatar Yuta Hirobe avatar noppe avatar Yasuyoshi IWAICHI avatar Roku avatar watanave avatar Itaru avatar Kaname Noto avatar Michibana Shito avatar freddi(Yuki Aki) avatar Kohki Miki avatar Kazuya Ueoka avatar Kazuki Nishida avatar Shunsuke Igusa avatar Shingo Tamaki avatar shunsuke sato avatar Xu avatar

Watchers

James Cloos avatar  avatar

xcodeproject's Issues

SwiftPM対応

Kuriを使ってGenerateを試したところ以下エラーが出てしまいました。

⟩ mint run kuri kuri generate Sample
Begin generate
Fatal error: function: type(with:)
file: /private/var/folders/6l/tgpq95256bb30qc831dzn0500000gp/T/mint/github.com_bannzai_Kuri/.build/checkouts/XcodeProject/Sources/XcodeProject/Core/PBX/ObjectType.swift
line: 44
description: ["unknown type from: XCSwiftPackageProductDependency"]: file /private/var/folders/6l/tgpq95256bb30qc831dzn0500000gp/T/mint/github.com_bannzai_Kuri/.build/checkouts/XcodeProject/Sources/XcodeProject/Core/PBX/ObjectType.swift, line 44
fish: 'mint run kuri kuri generate Sam…' terminated by signal SIGILL (Illegal instruction)

enumに XCSwiftPackageProductDependency がないのが原因のようです

Rename file

Is is possible to do a simple file rename? I see the ability to do append and remove, but is there any support for changing file paths?

Also is there an API to change the project name? Or the bundle ID?

Sorry, I'm trying to understand what's possible in this repo as I'm using it for my app (appmakerios.com). I can add more features this repo too if I find it lacks some features I need in my app.

Thanks!

Joe

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.