Over the years, a number of technologies have been used in the development of the iOS app. Objective-C was used as the programming language, as was standard back in 2011. At the end of 2014, Apple introduced a new programming language for developing iOS/OS X applications, called Swift.
Swift is a powerful and intuitive programming language that makes the programming of applications much easier and safer. Moreover, Swift is Open Source, which allows every developer to view the Swift source code and be involved in its development. To benefit from the advantages of Swift, we at ImmobilienScout24 started to use it to write parts of our iOS app in spring 2015.
Other technologies used by the team are:
- Xcode and appCode as a development environment (IDE)
- git with github and gitlab for version control
- XCTest and OCMock for unit tests
- KIF and EarlGrey for UI testing
- HockeyApp for crash monitoring and beta test app distribution
- NewRelic for app monitoring
In addition to these technical measures, we also used lots of quality improvement practices in our daily work.
The Technical Measures: Automated Tests
Writing tests that automatically test parts of the software has become an industry standard when producing software. There is a distinction between different kinds of tests. Three kinds of test were used during the development of the ImmobilienScout24 app.
Unit Tests: unit tests are used to test the smallest possible components (units) of the software. More specifically, this means that every Objective-C or Swift class within the project has a unit test class that tests the accuracy of the functionality. The test coverage of the entire project can be measured using certain tools. With over 2,000 unit tests, the test coverage of our project was over 80 percent. Another aspect of unit testing is so-called Test Driven Development, or TDD for short, where the test is written ahead of the actual software component. The software component is then implemented in such a way that it meets the requirements of the test. In our team, everyone was aware that unit tests are very important, But it was left to each developer to decide whether a test was written before or after the software components.
Snapshot Testing: snapshot testing is a kind of integration test, whereby a screenshot of every screen of the application is saved, and every test run is used to check whether anything has changed with the display of the screen. Display errors in the app can therefore quickly be identified when changing the program code. A Facebook Open Source framework was used to implement this kind of test.
UI Testing: during UI testing, the app is automatically launched and clicked to check whether the interaction of the various screens and overall navigation within the app behave as expected. As the operability of such tests depends on many variables and therefore represents a real challenge, we have tried a variety of tools and frameworks over the years, in order to guarantee the stability of this test. We are currently evaluating a new Google framework called EarlGrey.
Continuous Integration System
A smooth, efficient software development process requires the use of a Continuous Integration System, or CI for short. A CI has the task of building the entire software for every git commit and performing all the automated tests. If there are no errors, a version of the app is created. Otherwise the developers are notified, so that the bug can quickly be fixed.
For our application, we used Team City as the CI system. We chose Team City because it was already standard at ImmobilienScout24 and offers all the functions that were needed for our work. Other CI systems, such as free-of-charge Jenkins, can do the job just as well.
Apple’s Xcode provides a useful tool called Instruments for analyzing an app’s behavior. One of the key features that can be measured using Instruments is an app’s memory usage. Memory is a limited resource that should be carefully used, especially with a smartphone. An application that wastes memory could quickly be forced to close by the iPhone’s operating system. Before releasing a version of our app, we therefore used Instruments to conduct a memory analysis. This analysis helped identify the parts of our app that needed to be improved in terms of memory usage.
Despite our best efforts, 100-percent error-free software is almost impossible. Crash monitoring systems allow app crashes to be monitored during production. Every time the app crashes, it is logged in the system so that the developer can fix the bug in the next version. We initially used a platform called HockeyApp to monitor app crashes. ImmobilienScout24 now uses New Relic, which as well as logging app crashes also provides other useful readings about the app, such as the app’s response time and the network’s error rate, for example.