How MEGA engineered its iOS design tokens module
<h1>Introduction</h1>
<p>Here at MEGA, in order to build a consistent UI experience throughout all of our products on different platforms (Android, desktop, iOS, and our websites) it became clear that we needed to create a robust, consistent, and sustainable design system for our codebase.</p>
<p>With that goal in mind, we’ve decided to adopt an approach where design tokens (the basic building block of any design system: colours, radius, spacing, etc.) are defined in <code>JSON</code> specs given by the design team, in a way they can be used in a platform-agnostic manner.</p>
<p>In this article, we’ll deep dive into how we built <code><a href="https://github.com/meganz/MEGADesignToken" rel="noopener ugc nofollow" target="_blank">MEGADesignToken</a></code> - the Swift Package Manager (SPM) module responsible for creating and exposing <code>Swift</code> code based on those files, tackling topics such as: SPM Build Tool plugins, parsing strategies, data modeling, algorithms and code generation through <code>SwiftSyntax</code>.</p>
<p><a href="https://medium.com/@mega-blog/how-mega-engineered-its-ios-design-tokens-module-8c299b866df7"><strong>Learn More</strong></a></p>