Building iOS and Mac projects from the command-line could be a lot easier to work with.
Hopefully this post will give you a couple ways to make that happen.
I wanna talk about two different little tools that help ease the process of scripting or working with Xcode projects from the command line.
xcodebuild-rb is a neat little ruby gem that lets you create a
Rakefile inside the root of your Xcode project's folder that looks like this:
What does that get you?
Well, after creating that
Rakefile, running a quick
rake -T (which will list all available
rake tasks) will output something like this:
rake xcode:build # Builds the specified target(s).
rake xcode:clean # Cleans the build using the same build settings.
rake xcode:cleanbuild # Builds the specified target(s) from a clean slate.
One of the coolest features of
xcodebuild-rb is it's use of "formatters". One of my favorite formatters is called "progress". You can enable it like this:
XcodeBuild::Tasks::BuildTask.new do |t|
t.formatter = XcodeBuild::Formatters::ProgressFormatter.new
Then when you build using
xcodebuild-rb, your output will look something like this:
Building target: ExampleProject (in ExampleProject.xcproject)
Finished in 2.226883 seconds.
Read more about
xcodebuild-rb on Github
Apple ships Xcode with a command line tool called
xcodebuild, which as the name suggests, builds an Xcode project. One drawback about the built-in
xcodebuild tool is that it can't create
.ipa archive files.
xcodearchive isn't a ruby gem. It is just a
.rb file that you can put anywhere you'd like and run.
xcodearchive has a ton of great features, check out the USAGE output:
Usage: xcodearchive [OPTIONS]
Show version number
-v, --verbose Output more information
-g, --growl Show growl alerts to inform about progress of the build
-n, --do_not_keep_dsym_symbols Do not keep the dSYM symbols
-s, --show Show archive in Finder once created
-c, --clean Do a clean before building the Xcode project
-o, --ipa_export_path FOLDER Set the path of the folder where the ipa will be saved. Default is '~/Desktop'
-i DEVELOPPER_IDENTITY, Force the developper identity value
-p, --project PROJECT Specifiy xcode project
-h, --help Display this screen
Read more about
xcodearchive on Github
If you aren't already automating the tedious parts of your build and release processes, you are missing out. As any iOS developer knows, building and releasing can become some of the most monotonous and annoying parts of our jobs, hopefully these little tools will inspire you to start scripting your way to a smoother build/release cycle.
Task management is a pretty big deal. Over the past few decades of personal computing, literally thousands of applications have tried to solve the problem of managing your "TODO" list in a sensible, useful way.
The emergence of smartphones into the mainstream has brought about a renaissance of sorts of new applications throwing their hat into the ring of possible "perfect" solutions to the task management problem. This isn't always easy as everyone has their own set of specific wants and needs when it comes to "TODO" lists, and no single application is going to be "perfect" for everyone.
Each time another of these applications debuts, I always give it a try for a few days to see if it could be "the one for me". I've tried them all, seriously, I'm "that" guy about "TODO" list apps, almost to the point of being counter-productive. I've just never found the right mix of simplicity and power that really speaks to how I like to work through a list of tasks.
Cheddar is both a univeral iOS application and a web application. It's fully Retina-ready, on iOS and even on the web. Put simply, it is beautiful. The premise is simple: it's just text. Create a list by giving it a name, add tasks by typing some text. "Check off" a task by tapping or clicking. Yep, that's it.
You don't need to know or understand anything else to be able to use the app effectively, but that's not the end of the story, not even close.
Adding tasks in Cheddar couldn't be simpler, just type in the box at the top of the screen and press return. The iOS version of Cheddar even has a delightful little animation illustrating your task "popping" down to the end of your list.
Editing tasks is also super easy. On iOS, just tap the "Edit" button and then select a task to edit the text of, or re-order some tasks, or archive ones you don't need anymore. On the web, tasks are always re-orderable using some nice drag-and-drop functionality, and the pencil icon turns the desired task back into a text box for editing. It all feels very natural and very obvious.
Oh boy. Nothing Magical (the company behind Cheddar) really outdid themselves here. Every action you take while using Cheddar instantly syncs across to all your devices. Add a task on your phone, it instantly appears on the web, no refresh required. "Check off" a task on your iPad, and your iPhone instantly updates to reflect the change. You can really tell a ton of effort was put into the speed and simplicity of the syncing, and it really makes you feel confident about using the app. I love knowing that I'll never have a "I guess it hasn't updated here yet" moment ever again with my task lists. People on my side of the industry throw around the term "magic" pretty loosely these days, but Cheddar's syncing really does feel a bit like magic to me, more apps need to take note and follow suit.
Advanced users will be delighted to find a robust tagging system built around Twitter-style #hashtags. Simply type in something like
#someday into a task in Cheddar, and it becomes a hyperlink that, when tapped or clicked, will filter your list of tasks to only those containing that same hashtag. Again, simple, straightforward, and easy to understand.
Also present in both the iOS and web version of Cheddar is span-level Markdown support. Markdown fans will immediately see where this is going, but basically this means you can easily add hyperlinks, bold, italic, strikethrough, source code and even emoji to your tasks with very minimal effort. Cheddar has a great page describing all of the great things you can with this functionality here: Cheddar - Text.
You can always use Cheddar for free with up to two lists of tasks. If you want an unlimited number of tasks, you'll need to upgrade to Cheddar Plus. You can do this on the web for $1.99 USD a month or $19.99 a year. You can also upgrade to Cheddar Plus on iOS using a In-App Purchase Subscription which renews every 3 motnhs for $5.99. Compared to some other services, Cheddar's pricing is dirt cheap. Upgrading was a no-brainer for me. And, as I said, you can always use Cheddar with up to two lists of tasks completely free.
I've been using Cheddar for about 3 months while it has been in development and it really has turned out to be the perfect little task manager for me. I've used it to manage myself building apps, buying groceries, running errands, and doing some work around the house. In every single case I've found that it does it's job, gets out of my way, and lets me focus on actually completing my tasks. I would highly recommed you try it out.
Where To Get It
You can find Cheddar on the web at cheddarapp.com or on the App Store here. There's also a great little video showing off Cheddar's main features over here on Vimeo.