https://github.com/bitwarden/ios
Bitwarden mobile app for iOS.
https://github.com/bitwarden/ios
apple bitwarden ios ipad iphone swift
Last synced: 19 days ago
JSON representation
Bitwarden mobile app for iOS.
- Host: GitHub
- URL: https://github.com/bitwarden/ios
- Owner: bitwarden
- License: gpl-3.0
- Created: 2023-07-14T16:58:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-11T17:38:28.000Z (20 days ago)
- Last Synced: 2025-04-12T03:47:47.040Z (19 days ago)
- Topics: apple, bitwarden, ios, ipad, iphone, swift
- Language: Swift
- Homepage: https://bitwarden.com
- Size: 624 MB
- Stars: 288
- Watchers: 22
- Forks: 42
- Open Issues: 72
-
Metadata Files:
- Readme: README-bwa.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
[](https://github.com/bitwarden/authenticator-ios/actions/workflows/build.yml?query=branch:main)
[](https://gitter.im/bitwarden/Lobby)# Bitwarden Authenticator iOS App
Bitwarden Authenticator allows you easily store and generate two-factor authentication codes on your device. The Bitwarden Authenticator iOS application is written in Swift.
## Compatibility
- **Minimum iOS**: 15.0
- **Target SDK**: 15.0
- **Device Types Supported**: iPhone
- **Screen Sizes Supported**: iPhone SE to iPhone 14 Pro Max
- **Orientations Supported**: Portrait, Landscape## Setup
1. Clone the repository:
```sh
$ git clone https://github.com/bitwarden/authenticator-ios
```2. Install [Mint](https://github.com/yonaskolb/mint):
```sh
$ brew install mint
```If you're using a Mac with Apple Silicon with Mint installed via Homebrew, you may see the SwiftGen build phase fail with the following error:
`line 2: mint: command not found`
If so, or if you just prefer to install Mint without `brew`, clone the Mint repo into a temporary directory and run `make`.
```sh
$ git clone https://github.com/yonaskolb/Mint.git
$ cd Mint
$ make
```3. Bootstrap the project:
```sh
$ Scripts/bootstrap.sh
```> **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 run `bootstrap.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.
```sh
$ cp Scripts-bwa/post-merge .git/hooks/
$ cp Scripts-bwa/post-checkout .git/hooks/
```### Run the App
1. Open the project in Xcode 16.2+.
2. Run the app in the Simulator with the `Authenticator` target.### Running Tests
1. In Xcode's toolbar, select the project and a connected device or simulator.
- The `Generic iOS Device` used for builds will not work for testing.2. In Xcode's menu bar, select `Product > Test`.
- Test results appear in the Debug Area, which can be accessed from `View > Debug Area > Show Debug Area` if not already visible.### Linting
This project is linted using both SwiftLint and SwiftFormat. Both tools run in linting mode with every build of the `Authenticator` 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.
```sh
$ cp Scripts-bwa/pre-commit .git/hooks/
```## Project Structure
### AuthenticatorShared
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 `AuthenticatorShared` framework.
### GlobalTestHelpers
`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-bwa.yml` file.
## Contribute
Code contributions are welcome! Please commit any pull requests against the `main` branch. Learn more about how to contribute by reading the [Contributing Guidelines](https://contributing.bitwarden.com/contributing/). Check out the [Contributing Documentation](https://contributing.bitwarden.com/) for how to get started with your first contribution.
Security audits and feedback are welcome. Please open an issue or email us privately if the report is sensitive in nature. You can read our security policy in the [`SECURITY.md`](SECURITY.md) file.