each one has specific purpose but some of them are very important in day to day role of iOS Developers. Most iOS Developers like to do everything from GUI either Xcode or using third party GUI tools but skilled and experienced developer uses command line tools like boss. There are some useful tools that every iOS developer should know and few of them are prefixed with “XC”. In this post, let’s go through five of them.
xcodebuild
The command is a father of all the the commands in iOS development. You can do most of the iOS developer task like clean, analyse, build, test, archive with ‘xcodebuild’ command however you need to pass lot of option to ‘xcodebuild’ to get the right things done. You can explore these options using it’s man page
Or you can find all these useful information in the web page here. We can use xcodebuild to build, test and archive our project targets or schemes. The example of the ‘xcodebuild’ would be
The ‘xcodebuild’ is huge command and mastering it takes lot of time but once you know it then you can script anything related to iOS development.
xcode-select
Xcode has a active developer directory usually located at or we can set it with environmental DEVELOPER_DIR. The command is used to manage active developer directory of the Xcode so that we can manage two version of Xcode at the same time. We can switch between Xcode version e.g we want to use Xcode beta
We can also use ‘xcode-select’ to install Xcode command line tools with GUI interaction using command
xcrun
Xcode command line tools can be run easily with command. It gives us ability not only to find the tools but also execute them. We can use ‘xcrun’ to find the swift toolchain
We can execute most of the Xcode command tools using ‘xcrun’. The most useful tool that can be used with ‘xcrun’ would be ‘simctl’ to manage Simulators using command line. We can create, edit, erase and delete simulator using command line using ‘simctl’ e.g we can create
We can also delete, erase simulators using their identifiers. You can read more about xcrun here
xcscontrol
Xcode Server is continuous Integration system provided by Apple. We can use to manage Xcode Server activities such as start, stop, restarting the sever. We can reset Xcode Server using
xctest
XCTest can be executed using however there is another tools we can use it for running our unit tests. We can use ‘xctest’ to run unit tests.
There are so many tools available but we are going to cover only these tools as part of this post.
http://shashikantjagtap.net/top-5-command-line-tools-ios-developer/
<
p class=”curated_content”>On – 04 Apr, 2017 By Shashikant Jagtap