By Pierre Abi-aad (Lead Engineer iOS)
The leboncoin iOS community is made up of 28 developers working on a modular technical stack. The main functionality areas are organised in repositories. Each of them contains an Xcode project which will generate a framework.
Our CI/CD is completely in-house, with 20 Mac minis on the hardware side and Zuul / Fastlane for the software.
Upgrades and patch requirements are dealt with on an ongoing basis by a number of infrastructure developers.
- iOS updates
- Xcode updates
- macOS updates
- Unit testing / Integration testing that may fail
- Maintenance outage
This architecture supports two objectives:
- To help developers work as easily and as quickly as possible.
- To be able to deliver an App Store ready application four times a day for POs & QAs to test.
When we heard about Xcode Cloud, we were over the moon. The prospect of complete hardware management and job scheduling by Apple is very good news.
Being able to launch our different builds/testing very quickly on multiple versions of Xcode is an obvious advantage.
So we had to try out this new service.
We got access to the beta version belatedly, in November 2021, but once we got the golden ticket, what were we to do with it?
As already mentioned, our architecture is quite complex (another article may come back to this in detail) and it is difficult for us to devote all our resources to a beta version of a service that may not meet our requirements right away. So we had to find another way to explore the terrain.
A few enthusiastic iOS developers had been meeting for a few weeks via BBLs to build a tooling application for our community on macOS: this was the perfect playground!
A project from scratch, where we could decide on the architecture we wanted to set up without being bogged down by refactoring.
Plus, on the CI/CD side, the project needed to not fit into a roadmap that would have monopolised the infrastructure.
Can you see where this is going?
Xcode Cloud appeared to be the ideal solution to start automating certain tasks on our project.
Application
The application is split into two panels:
- In the left one we display the entry points to our different features
- If an entry point is selected, its function is displayed in the right-hand panel.
Architecture
Unlike the leboncoin iOS stack, we went with a single repository to avoid a complex chain of dependencies that would be overkill for a project like this.
The breakdown is well defined, however: the main application is almost empty shell that just contains all the functions. These are split into Swift packages, which are then imported.
A Common package is used to house code that can be reused in other packages:
- System Design
- Extensions
- Repositories
- Use cases
The code is hosted on our corporate GitHub and we use Trunk Based Development.
Finally, participants must submit pull requests to get validation from a peer and also from the CI.
This is the aspect that we are interested in.
You can configure your project and manage your CI / CD directly within Xcode. The documentation for Xcode Cloud is comprehensive and very clear: this is an excellent point.
Workflows
Workflows are the entry point for everything you want to automate.
Each workflow can be configured to a fairly detailed level, and the interface is