Giter Site home page Giter Site logo

xcode-project-manager's Introduction

Xcode Project Manager

Overview

Xcode Project Manager aims at making Xcode project easier to setup, build and even run in a single command line tool. It providing convenience for both manually usage and interacting with other programs.

Specifically, xpm makes the most commonly used commands easier to execute. Examples:

  • You can simply run xpm build now to avoid typing the very very long xcodebuild -workspace XPM.xcworkspace -scheme xpm -configuration Debug -sdk iphoneos build command each time you build. xpm will remember the default option you choose by writing to a config file locally or globally, it will even guess the options first time you run it.
  • You can simply run xpm install instead of bundle install && bundle exec pod install.

Important

Current Status

Xcode Project Manager currently is at the very beginning stage, only very basical and limited feature is provided, like build and clean. But we're keep on moving! You can track the progress in the Milestones page. Feel free to tell us there what you eager to use so we can consider speeding it up!

If you're interested in this project, give it a star or just watch its releases, and feel free to post how you think and feel in Discussions.

If you meet any issue or have any feature idea, feel free to open up an issue!

Install

Currently you can install xpm by donloading it from the Releases page, and put it to /usr/local/bin/ folder. We will make it available on Homebrew in the future.

Usage

Xcode Project Manager provides the following features as subcommands:

Command Status
config ๐Ÿšง not ready yet
install ๐Ÿšง not ready yet
build ๐Ÿš€ basically ready
docbuild ๐Ÿšง not ready yet
run ๐Ÿšง not ready yet
exec ๐Ÿšง not ready yet
print ๐Ÿš€ basically ready
clean ๐Ÿš€ basically ready

xpm config

xpm will automatically generate a .xpm.yml file to pwd when first time you use xpm in your project. The configs with default values available are listed as follows:

config:
  autoChange: true # whether change this file when executing commands with different configs
install:
  mode: cocoapods # maybe carthage, spm will be supported in the future
build:
  mode: xcodebuild # maybe bazel will be supported in the future
  xcodebuild:
    workspace: XPM.xcworkspace # will ask you to pick one at first time
    project: XPM.xcodeproj # will ask you to pick one at first time
    scheme: xpm # will ask you to pick one at first time
    configuration: Debug # or Release
    sdk: iphoneos # or iphonesimulator, etc.
    beautify: true # use xcbeautify or xcpretty to beautify output logs
    logLevel: error # only print logs which level are equal to or more serious than the given value
    generateBuildServerFile: false # use xcode-build-server to generate buildServer.json file
    continueBuildingAfterErrors: false
run:
  type: device # or simulator
  target:
    device: Saafo's iPhone 14 Pro # will ask you to pick one at first time.
    simulator: iPhone 14 Pro # will ask you to pick one at first time.
exec:
  scripts:
    hello: echo 'hello world' # just an example.

You can also run xpm config --local config.autoChange false to change the config(๐Ÿšง not ready yet).

And you can also configure some basic configs(like autoChange and mode) at ~/.xpm.yml. The global config file is used when generating new .xpm.yml in your project.

xpm install(๐Ÿšง not ready yet)

xpm install helps to setup your project (like resolving and downloading all dependencies) in a single command.

In cocoapods mode

Commands Equals to
xpm install bundle install && bundle exec pod install
xpm install bundle bundle install
xpm install pod bundle exec pod install

TODO: xpm install bundle is even longer than bundle install.

xpm build

xpm build helps to build your project and shows building logs of specific levels.

In xcodebuild mode

When running xpm build for the first time, xpm will ask you to select default configs and will write to .xpm.yml file to pwd. When already having .xpm.yml, xpm will use the configs in the file.

We know manually input workspace or project or scheme name is kind of pain, so we add completion as you type when need input them.

Besides, the most different thing is that, you can update configs in the config file through command line instead of manually edit it. A simple process is like:

  1. Run xpm build -sdk and press tab, xpm will give a list of all available sdks, you can choose one to finish the completion.
  2. Currently the command is like xpm build -sdk iphonesimulator, and if config.autoChange is true and you execute the command, build.xcodebuild.sdk will update it's value to iphonesimulator(You'll never manually input the long iphonesimulator anymore!). You can also add --no-save flag to avoid updating the config.
  3. Vice versa, when config.autoChange is false and you can add --save flag to force updating the config.

xpm docbuild

For DocC documentation generating, similar as xcodebuild docbuild.

xpm run(๐Ÿšง not ready yet)

xpm run mainly aggregating simctl and ios-deploy for simulator and device running into a single command.

xpm exec(๐Ÿšง not ready yet)

Used as executing shell scripts configured in exec.scripts.

xpm print

Print basic infomation about the project, used as interacting with other command line tools.

xcode-project-manager's People

Contributors

saafo avatar

Stargazers

 avatar  avatar

Watchers

 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.