My question is how can I create and Xcode project from the command line. By create I don't mean building a project. I mean how can i create a project forlder i.e shift + cmd + N.
xcodebuild is a command-line tool that allows you to perform build, query, analyze, test, and archive operations on your Xcode projects and workspaces from the command line. It operates on one or more targets contained in your project, or a scheme contained in your project or workspace.
The Command Line Tools Package is a small self-contained package available for download separately from Xcode and that allows you to do command line development in OS X. It consists of two components: OS X SDK and command-line tools such as Clang, which are installed in /usr/bin.
I've written elsewhere about How to Open Terminal on MacOS – just click the Spotlight icon in the menu bar and type “terminal.” You can also enter the command xcode-select --install in the terminal to begin the installation process. You'll see a panel that asks you to install Xcode Command Line Tools.
Cmake will create Xcode projects along with any other type of build file you could desire. It is heavily customizable and can handle multiple targets, dependencies, linking, and any other property you could image. It has a steep learning curve but is a very very powerful tool. We currently use cmake to genererate both the Xcode and visual studio solution from the same code base.
The simplest example of cmake is $cmake -G "Xcode" ...args...
this would create and all all the nessecary files to your project from your args.
Here is the main page: http://www.cmake.org
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With