Articles on Xcode

Red light
August Jaenicke

August Jaenicke

CocoaPods for Device-Only iOS Libraries

Here at Carbon Five, we consider testing the software we write to be crucial to the long term stability and velocity of our projects. We also value developer productivity. The iOS simulator is a very valuable tool for testing and development. Recently a major upgrade of a library prevented an iOS project from running and

Jonah Williams

Jonah Williams

Fixture data for iOS tests

I have talked about running xcode units tests from the command line before. When I’m running tests I often want to load some sort of test fixture data for use in my tests. For example: I might want to keep a file of recorded API responses so that I can stub out network calls. In

Rob Pak

Rob Pak

Managing iOS Configurations per Environment in Xcode 4

Update 4/2014 I recommend using .xcconfig files for managing your configurations. Take a look at this post. At Carbon Five we usually have 3 – 4 environments our iOS applications will run against: development, acceptance, staging and production. Often, the property values that are unique across environments are URLs to APIs that we are integrating

Jonah Williams

Jonah Williams

Debug logging with Xcode 4 breakpoints

NSLog calls do not belong in release builds. Logging is slow and the performance impact of log statements on a device can be considerable. Logging is also noisy, it can obscure useful debugging information and may leak information you would rather not expose in a release build. Looking at my device’s system log I see

Jonah Williams

Jonah Williams

Automated ad hoc builds using Xcode 4

I’ve previously discussed Continuous Integration for iPhone Projects in TeamCity using Xcode 3 and Building Xcode 4 Projects from the Command Line. Now I’ll tie those together and use TeamCity to automatically create ad hoc builds I can install over the air (directly onto a device without using iTunes) every time I check in code.

Jonah Williams

Jonah Williams

Running Xcode 4 unit tests from the command line

Command line builds for Xcode 4 projects are a good first step but I really want to get my project’s tests running on a continuous integration server again. Since “test” isn’t a valid build action to pass to xcodebuild I’ve been looking for a configuration which would allow me to run tests in a headless

Jonah Williams

Jonah Williams

Building Xcode 4 projects from the command line

The Xcode 4 developer tools introduced some changes to the xcodebuild command line tool. Instead of specifying a project and target developers can now provide a workspace and scheme to build.

Colors
Jonah Williams

Jonah Williams

Using Open Source Static Libraries in Xcode 4

Xcode 4.0.1 allows us to more easily create and use third party libraries in iOS projects. I think the process is still more complicated than it needs to be. Xcode’s documentation suggests that it should automatically detect implicit dependencies and index classes across workspaces but I have not found this to be the case. Here

Jonah Williams

Jonah Williams

Code Formatting in Xcode 4

Automatic indentation and cleanup of code seems to have improved in Xcode 4 (Editor menu – Structure – Re-Indent) but it still doesn’t offer full code reformatting or the flexibility of a tool like Uncrustify. If you’re used to having external code formatting in Xcode available you might be disappointed to find the User Scripts

Jonah Williams

Jonah Williams

Continuous integration for iPhone projects in TeamCity

Carbon Five has been using TeamCity as our continuous integration server for most of our recent projects, including our iPhone work. Out continuous integration environment monitors the git repository used by each project, runs the project’s tests each time a change is pushed to the repository, and can automatically produce an ad-hoc build of an