Skip to content

hmrc/ios-swiftui-components

Repository files navigation

HMRC SwiftUI Components Library for iOS Build Status

Build applications using components with the HMRC look and feel.

Requirements

  • iOS 14.0+
  • Swift 5.3

Installation

Swift Package Manager

This library is set up to be used via Swift Package Manager - you can develop locally by following the instructions within the wiki

Using the Component Library

The component library is created using molecular design.

You can read more about this, and see the individual atoms, molecules, and organisms in the Wiki

Contributing

Getting Started

The first step is to install Homebrew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

We can then use Homebrew to install Carthage, SwiftLint, and fastlane:

brew update && brew install carthage && brew install swiftlint && brew install fastlane

We then need install the latest Xcode Command Line Tools, and check this is set in Xcode in Preferences > Locations.

xcode-select --install

We're now ready to build and test the components app! 🎉

open SUICompanionApp.xcodeproj

Tools

fastlane

We use fastlane to automate tedious tasks such as tagging a new release.

Our fastlane README documents our custom actions.

SwiftLint

We use SwiftLint to enforce Swift style and conventions. Our custom rules can be found in our .swiftlint.yml.

Using Android?

We have an android version of this library available here