Search

Building Quality iOS Apps, Quickly

Chris Downie

4 min read

Jan 7, 2020

Building Quality iOS Apps, Quickly

At Big Nerd Ranch, we take pride in building quality apps for our clients. But quality isn’t the only concern when building an app for your business. Often, it’s also important to get these apps in the App Store as quickly as possible. So how do we uphold our ideals for quality while still delivering our apps on time and on budget?

Fortunately, it’s not impossible. Here are three best practices that we use (and recommend others use, too!) to deliver iOS, iPadOS, tvOS, and macOS apps to market.

Unit Testing

There’s just no way around it – the only way to know that an app does what it’s supposed to do is to test it. However, having a large group of manual QA testers can be a costly approach to ensuring quality. A more cost-effective way to engineer a quality app for an Apple platform is to write the code that tests the app itself.

But not all apps are equally testable. In order for a test to have the maximum impact on app quality and speed of delivery, apps need to be built from the ground up with testability in mind. When building an app to be testable, we recommend that apps:

  • Are built modularly, with single-responsibility components that can keep unit tests focused
  • Use dependency injection to unit test each component in isolation
  • Have unit tests written as features are built, so new functionality is proven to work before a user even sees it

This unit testing discipline not only improves the overall quality of the app, but it helps in the speed of delivery. A well executed test plan means less time spent investigating bugs and more time spent building features.

Logging

Nevertheless, bugs still happen. A good unit testing discipline only prevents defects you can anticipate. How can you minimize engineering time spent investigating user-reported bugs so they can spend more time building features?

Our recommended approach to solve this problem is a thorough logging discipline. We recommend that all apps use CocoaLumberjack to:

  • Log any user interaction
  • Log any significant errors or unusual state
  • Share the logs directly from device with a UIActivityViewController

This can substantially reduce the time it takes to find and fix an issue. Rather than asking a user to self-report everything they did to end up in a weird state, they can just send an email to the developers with a log that looks like this:

[Authentication] User cdownie@bignerdranch.com logged in.
[Settings] Settings icon tapped.
[Settings] Edit Address tapped.
[Settings] Save Address tapped.
[Settings] Error: Updating the user address failed with error: { status: 403, error: "Zip code did not match provided city & state" }

 

Continuous Integration

While these (and other) code quality tasks are important, they can also quickly become a project maintenance burden. If you’re manually running unit tests, ensuring code consistency with a linter, or submitting periodic builds to TestFlight, that’s time that could otherwise be spent building features and delivering value to your users. Additionally, these manual chores are all too easy to accidentally skip when pressed for time.

So, automate it! The fastest chore is the one you don’t have to do. We recommend configuring a continuous integration server like CircleCI to run these tasks for you. Specifically, we recommend:

  • Running code-quality tasks on both master and feature branches
  • Parallelizing long-running tasks to improve the speed of the continuous integration system
  • Generating a new, versioned build of your app for every commit to master
  • Uploading these new builds to TestFlight automatically with fastlane

That last point is particularly important. With frequently updated builds sent out regularly to early beta testers, you can get early feedback on your app’s progress. Crucially, this can tell you what features to focus further development on. All without impacting the engineering team’s speed of delivery.

Deliver Quality, Quickly

With these techniques in hand, your engineering team should now be able to:

  • Deliver high-quality features with unit tests
  • Debug issues quickly with concise user-generated logs
  • Iterate quickly on early user feedback with continuous integration

Best of all, you can do all of this while keeping the engineering team focused on delivering new features.

If this all seems overwhelming, not to worry. At Big Nerd Ranch, we have decades of experience applying these best practices and more to build apps quickly, confidently, and with quality. We would be more than happy to make your idea for an iOS, iPadOS, tvOS, or macOS app a reality. Feel free to schedule a call with us today.

Juan Pablo Claude

Reviewer Big Nerd Ranch

During his tenure at BNR, Juan Pablo has taught bootcamps on macOS development, iOS development, Python, and Django. He has also participated in consulting projects in those areas. Juan Pablo is currently a Director of Technology focusing mainly on managing engineers and his interests include Machine Learning and Data Science.

Speak with a Nerd

Schedule a call today! Our team of Nerds are ready to help

Let's Talk

Related Posts

We are ready to discuss your needs.

Not applicable? Click here to schedule a call.

Stay in Touch WITH Big Nerd Ranch News