[!TIP] This repo has the new native iOS app. Looking for the legacy .NET MAUI apps? Head on over to bitwarden/mobile
Clone the repository:
$ git clone https://github.com/bitwarden/ios
Install Mint:
$ brew install mint
Alternatively, if you prefer to install Mint without brew
, clone the Mint repo into a temporary directory and run make
.
$ git clone https://github.com/yonaskolb/Mint.git
$ cd Mint
$ make
Bootstrap the project:
$ Scripts/bootstrap.sh
Hint For development purposes it's possible to use a local build of the Bitwarden SDK by setting the environment variable
LOCAL_SDK
totrue
before running the bootstrap script. Review Linking SDK to clients for more details.Note Because
Scripts/bootstrap.sh
is how the project is generated,bootstrap.sh
will need to be run every time the project configuration or file structure has changed (for example, when files have been added, removed or moved). It is typically best practice to runbootstrap.sh
any time you switch branches or pull down changes.
Alternatively, you can create git hooks to automatically execute the bootstrap.sh
script every time a git hook occurs. To use the git hook scripts already defined in the Scripts
directory, copy the scripts to the .git/hooks
directory.
$ cp Scripts/post-merge .git/hooks/
$ cp Scripts/post-checkout .git/hooks/
Bitwarden
target.Due to slight snapshot test variations between iOS version, the test target requires running in an iPhone 15 Pro simulator (iOS 18).
In Xcode's toolbar, select the project and a connected device or simulator.
Generic iOS Device
used for builds will not work for testing.In Xcode's menu bar, select Product > Test
.
View > Debug Area > Show Debug Area
if not already visible.This project is linted using both SwiftLint and SwiftFormat. Both tools run in linting mode with every build of the Bitwarden
target. However, if you would like to have SwiftFormat autocorrect any issues that are discovered while linting, you can manually run the fix command mint run swiftformat .
.
Additionally, if you would like SwiftFormat to autocorrect any issues before every commit, you can use a git hook script. To use the git hook script already defined in the Scripts
directory, copy the script to the .git/hooks
directory.
$ cp Scripts/pre-commit .git/hooks/
The following is a list of all third-party dependencies included as part of the application.
The following dependencies are used in the development environment only. They are not present in deployed code.
The following is a list of additional third-party dependencies used as part of the CI/CD workflows. These are not present in the final packaged application.
This project's structure is split into separate sections to support sharing as much code between all of the targets as possible. All core functionality and the majority of UI elements can be found in the BitwardenShared
framework.
GlobalTestHelpers
is a directory that contains helper files used in all test targets. This directory is included in each target that is defined in the project.yml
file.