6 Effective Tips for iOS Development Team

Build a great foundation for seamless team work

James Tang
iOS Apprentice

--

The Carshare HK iOS app is one of the most beautiful app I had helped built. The story started since I’ve met the team at the Angelhack hackathon, where I met Christopher Yeung (CEO of Carshare.hk), Meng To (Designer) and Benny Ng (Developer), who welcomed me to join them even as a part-time engineer.

Having been 4 years of iOS development, dedicating only 2 days on a full featured iOS client is very challenging. It couldn’t be just me to do all the work from start to finish, there’re things that I’d need to delegate, and fortunately the team is very willing to learn and pickup things, so I can move on to the more challenging tasks.

So, here are the tips that works for us:

1. Setting up a solid project foundation

Xcode Project Navigator (left) and Interface Builder (right)

A group had to work efficiently, here we setup our folder structures into four main categories: Cell, Model, ViewControllers, and Utilities. We also want to use Storyboard, which is a very powerful yet highly flexible tool that allow quick glance and visual editing in matter of seconds.

However, large Storyboards can also be expensive to load for your Mac. At some point our designer helped to separate them into multiple Storyboard files, this not only helped Interface Builder to be more performant, and it also reduced chances for merge conflicts.

2. Package manager

You can also specify custom repositories by using the :git and :branch modifier

We used to use submodules, now we’ve a better solution. CocoaPods is a package manager that modelled after Rubygems to manage all sorts of dependancies and 3rd party libraries. Once setup, any team member can add any kinds of frameworks and libraries just in one single line of configuration, and CocoaPods is intelligent enough to resolve cross dependancies.

Noted we can easily specify custom repositories with :git and :branch modifiers, and make sure you also include inhibit_all_warnings! to eliminate warning noise that isn’t related to the code base.

3. Feature branches

When more than one people are working on the repository, bad conflicts could occur. Encapsulating our implementation in separate feature branch can make everyone happy in their own sandbox. The more experienced can then merge back when things are completed. That being said, having the team to know what each other is doing and cleanly separate the responsibility are always necessary to prevent merging chaos.

4. Using Configurations

Project Info with Split panel. Split panel can be triggered with option + click.

Switching between development, staging, and production environment can be boring and error-prone. Using Xcode’s Configurations and Preprocessor Marcos are excellent way to separate environment specific info.

Our developer set this up for separating configurations on Social Network integration and Analytics Framework app keys.

5. Environment Variables

The Scheme panel can be triggered by shortcut — command + shift + ,

Additionally, you can also specify a user specific setting for using the Environment Variables by editing the Configurations Scheme. It’s a temporary runtime configuration until you detach your device from the debugger, not only you can specify YES/NO, but any string values that you like to customize, super handy.

6. Test Cases

Running XCTest case by command + u

Last but not least, it’s also good to use test cases to verify if anyone in the team accidentally break something ;P You should look at Apple’s Unit Test Your App.

Conclusion

It has been a very fruitful time in Carshare.hk. There’re more tips and tricks like using objClean to add warnings, alternative git branching model, as well as written articles on objc.io.

So, which are your favourite tips?

If you like this and want to know more about the challenging stuffs and reusable components that I’ve learned and build under the hood, let me know! Download the iOS app, let us know what you think, and you can follow @jamztang on Twitter, and also follow this collection.

--

--

James Tang
iOS Apprentice

Sketch Plugins and iOS UX Engineer. Opensource projects contributor, share on Twitter. @jamztang