Ios Pass Save

iOS client for Proton Pass

Project README

Proton Pass

This repository contains the source code for the Proton Pass iOS application.

Installation

The app targets iOS 16 and above. Make sure you have Xcode 15+ installed, check out the repo and open ProtonPass.xcodeproj to run the project.

Technical Choices

UI

  • All the views are written in SwiftUI
  • Navigation between views are done using UIKit:
    • UINavigationController when running on iPhones
    • UISplitViewController when running on iPads

Dependency manager

CocoaPods & Swift Package Manager

Modularization

The project is modularized into targets:

  • iOS: the main app target
  • AutoFill: the AutoFill extension

And local Swift packages:

  • Entities: models
  • Client: network layer, database operations, repositories...
  • Core: coordinator, domain parser, password/passphrase generator, 2FA token generator, useful extensions...
  • DesignSystem: UI utilities (custom views, view modifiers, icons, colors...)
  • Macro: macro
  • UseCases: use cases, interface for Rust library

Debug

Debug network traffic

You can print to the console information related to requests (HTTP method, path, headers, & parameters) and responses (HTTP method, status code, url, headers & result) by activating me.proton.pass.NetworkDebug environment variable in the scheme configuration. This is disabled by default.

Debug Sentry activities

You can print to the console Sentry activities by activating me.proton.pass.SentryDebug environment variable in the scheme configuration. This is disabled by default.

Tools

Dependency injection

The main DI tool used is Factory. It is very light but yet very powerful.

SwiftLint

This is the main linter for the project. To install run the following Homebrew command:

brew install swiftlint

If you don't have this tool installed please refer to the following link to set it up: SwiftLint The configuration for this tool can be found in the .swiftlint.yml file.

SwiftFormat

This is the main code reformatting tool for the project. To install run the following Homebrew command:

brew install swiftformat

If you don't have this tool installed please refer to the following link to set it up: SwiftFormat The configuration for this tool can be found in the .swiftformat file

Sourcery

This is a tool to easily generate mocks for unit testing. To install it run the following Homebrew command:

brew install sourcery

If you don't have this tool installed please refer to the following link to set it up: Sourcery The configuration for this tool can be found in the .sourcery.yml file. At the moment the configuration only take into account iOSTests but it could be extended to take into account dependencies in the near futur.

To Generate the mocks please follow these instructions:

  • First you need to annotate your protocol like following:
// sourcery: AutoMockable
protocol Test {
 // implementation of protocol
}
  • Then run the following CLI command
sourcery

You should now see the new mocks appear in the Generated subfolder of iOSTests target

Changelog

For a detailed list of changes in each version of the project, please refer to the CHANGELOG file.

Contributing

We value and welcome contributions from the community to help make this project better.

Please note that while we encourage contributions, we have a specific process in place for handling pull requests (PR) and merging changes. To ensure a smooth workflow, we manage contributions internally on our GitLab repository rather than directly on GitHub.

Here's how you can contribute:

  1. Fork the Repository: Start by forking this repository to your own GitHub account.

  2. Make Your Changes: Create a new branch from main in your forked repository and make the necessary changes.

  3. Test Your Changes: Ensure that all tests, swiftlint check and swiftformat check are passing.

To do a swiftlint check, run this command:

> swiftlint

To do a swiftformat check, run this command:

> swiftformat --lint .

To let swiftformat format your code, run this command:

> swiftformat .
  1. Submit a PR: Once your changes are ready for review, you can submit a PR on this repository. Our team will review your PR, provide feedback, and collaborate with you if any adjustments are needed.

  2. Collaborate: Feel free to engage in discussions and address any feedback or questions related to your PR. Collaboration is key to delivering high-quality contributions.

  3. Finalization: Once the PR is approved and meets our criteria, it will be merged into our internal Gitlab repository. Subsequently, your PR will be closed, and your changes will be incorporated when we periodically synchronize updates to GitHub.

License

The code and data files in this distribution are licensed under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See https://www.gnu.org/licenses/ for a copy of this license.

See LICENSE file

Open Source Agenda is not affiliated with "Ios Pass" Project. README Source: protonpass/ios-pass

Open Source Agenda Badge

Open Source Agenda Rating