At Swarm we build apps for both iOS and Android, so there are many hoops that we have to jump through before we can get those apps out on the app store. Fortunately, while these steps are time consuming, they are similar each time. This allows us to automate the process. Swarm Intern Developer, David, has recently been using Fastlane, which can take care of everything beyond the point at which you have a working app.
Both mobile operating systems will have a Fastlane folder in each directory within your project. Fastlane works by bringing together a series of ‘lanes’ or plugins that run one after another when you run a Fastlane build. These tools can be configured via fastfile.js for your specific project. This file is written in Ruby and it instructs your build on how to run.
Using a range of customisable plugins, Fastlane can test, build it, take screenshots, sign your app, document, release to app stores and more.
One of the big issues with mobile app deployment is the amount of time it takes to deploy. Fastlane automates this process which allows us to push out app releases much more frequently and keeps our deployments consistent. However, automation only works if you set it up properly in the first place and continue to maintain it. One of the disadvantages of automatic deployment through the use of software such as Fastlane, is that the plugins should always be up to date. Due to the nature and speed of progression in mobile app development, this means that plugins are frequently changing, and have the potential to upset your build. All of the plugins play a role and if one fails, your build will too! Fortunately, the Fastlane error messages are usually comprehensive and straight-to-the-point.
Fastlane can also allow for Continuous Integration (CI):
Continuous Integration – Automation of the building and testing processes each time changes are made to the source control within a project.
CI will keep your project source code clean, lean and any bugs should be caught earlier – providing you set up automated tests. It also means that we should have versions of applications tested and ready for clients as soon as possible.
When it comes to Continuous Integration there are many tools that are compatible with Fastlane:
- Travis CI is the best when working on open source projects that must be tested in a range of environments. Travis CI is also free and integrates with GitHub which is why it is popular with small projects.
- Bitrise is one of the newest CI tools and it has a hosted cloud environment meaning that you don’t need to maintain a physical or virtual machine for builds.
- Jenkins is stable and highly customisable, due to this it is typically the preferred choice in larger and more complicated projects. However, this means it can take longer to configure per project.
- Circle CI has a large user base and has the ability to run within the cloud or inside your own data centre. It’s also fairly simple to use and very quick to set up.
The answer to the question: ‘which Continuous Integration tool is best?’ comes down to the specific project as each has its own benefits and faults.
SwarmOnline are experts in implementing Continuous Integration solutions and we can help you automate your mobile test and build environment. Get in touch with us and come in for a coffee with our DevOPS guys and talk automation!
See more blogs like this here.