From a4b12e5b5e18ff335a4b50833401f37f8036df70 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Mon, 16 May 2022 16:04:28 +0300 Subject: [PATCH] Closes #55, #56 - Update project documentation --- CONTRIBUTING.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 46 +++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..e1bad6b2a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,48 @@ +# Contributing code to Matrix + +Please read https://github.com/matrix-org/synapse/blob/master/CONTRIBUTING.md. + +Element iOS support can be found in this room: [![Element iOS Matrix room #element-ios:matrix.org](https://img.shields.io/matrix/element-ios:matrix.org.svg?label=%23element-ios:matrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#element-ios:matrix.org) + +## Setting up a development environment + +### Xcode + +We suggest using an Xcode version later than 13.2.1. + +The Xcode project can be directly compiled after checkout through the shared ElementX scheme which includes the main application as well as the unit and UI tests. + +The Xcode project itself is generated through [xcodegen](https://github.com/yonaskolb/XcodeGen) so any changes shouldn't be made directly to it but to the configuration files. + +### Dependencies + +Dependencies will be automatically fetched through the Swift Package Manager, including a release version of the MatrixRustSDK. If you encounter issues while resolving the package graph please attempt a cache reset through `File -> Packages -> Reset Package Caches`. + +For instructions on how to setup the RustSDK in development mode please refer to the [matrix-rust-components-swift](https://github.com/matrix-org/matrix-rust-components-swift) repository. + +### Continuous Integration + +ElementX uses Fastlane for running actions on the CI and tries to keep the configuration confined to either [fastlane](fastlane/Fastfile) or [xcodegen](project.yml). + +Please run `bundle exec fastlane` to see available options. + +## Pull requests + +Please see our [pull request guide](https://github.com/vector-im/element-android/blob/develop/docs/pull_request.md). + +## Implementing a new screen + +New screen flows are currently using MVVM-Coordinator pattern. Please refer to the screen template under [Tools/Scripts/createSimpleScreen.sh](Tools/Scripts/createSimpleScreen.sh) to create a new screen or a new screen flow. + +## Coding style + +For Swift coding style we use [SwiftLint](https://github.com/realm/SwiftLint) to check some conventions at compile time (rules are located in the `.swiftlint.yml` file). +Otherwise please have a look to [Apple Swift conventions](https://swift.org/documentation/api-design-guidelines.html#conventions). We are also using some of the conventions of [raywenderlich.com Swift style guide](https://github.com/raywenderlich/swift-style-guide). + +We enforce the coding style by running checks on the CI for every PR through [Danger](Dangerfile.swift), [SwiftLint](.swiftlint.yml) and [SonarCloud](https://sonarcloud.io/project/overview?id=vector-im_element-x-ios) + +We also gather coverage reports on every PR through [Codecov](https://app.codecov.io/gh/vector-im/element-x-ios) and will eventually start enforcing minimums. + +## Thanks + +Thank your for contributing to Matrix projects! \ No newline at end of file diff --git a/README.md b/README.md index 0d424eaee..99779f8a3 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,50 @@ +[![Element iOS Matrix room #element-ios:matrix.org](https://img.shields.io/matrix/element-ios:matrix.org.svg?label=%23element-ios:matrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#element-ios:matrix.org) +![GitHub](https://img.shields.io/github/license/vector-im/element-x-ios) + ![Build Status](https://img.shields.io/github/workflow/status/vector-im/element-x-ios/Tests?style=flat-square) +![GitHub release (latest by date)](https://img.shields.io/github/v/release/vector-im/element-x-ios) + [![codecov](https://codecov.io/gh/vector-im/element-x-ios/branch/develop/graph/badge.svg?token=AVIJB2MJU2)](https://codecov.io/gh/vector-im/element-x-ios) -[![License](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg?style=flat-square)](https://opensource.org/licenses/Apache-2.0) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=vector-im_element-x-ios&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=vector-im_element-x-ios) +[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=vector-im_element-x-ios&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=vector-im_element-x-ios) +[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=vector-im_element-x-ios&metric=bugs)](https://sonarcloud.io/summary/new_code?id=vector-im_element-x-ios) # Element X iOS -Element X iOS is a [Matrix](https://matrix.org/) client provided by [Element](https://element.io/) and based on the [Matrix Rust SDK](https://github.com/matrix-org/matrix-rust-sdk). +ElementX iOS is a [Matrix](https://matrix.org/) iOS Client provided by [Element](https://element.io/). -It is currently in an alpha stage and built as a prototype for Rust support on Apple platforms. +The application is a total rewrite of [Element-iOS](https://github.com/vector-im/element-ios) using the [Matrix Rust SDK](https://github.com/matrix-org/matrix-rust-sdk) underneath and targetting devices running iOS 15+. + +## Rust SDK + +ElementX leverages the [Matrix Rust SDK](https://github.com/matrix-org/matrix-rust-sdk) through an FFI layer exposed as a [swift package](https://github.com/matrix-org/matrix-rust-components-swift) that the final client can directly import and use. + +We're doing this as a way to share code between platforms and while we've seen promising results it's still in the experimental stage and bound to change. + +## Roadmap + +Our current roadmap is available [here](https://github.com/orgs/vector-im/projects/43/views/3) but as the projects are in their initial stages this is subject to change. + +We are aiming to have a fast and fully functional personal messaging application by the end of the year. + +## Contributing + +Please see our [contribution guide](CONTRIBUTING.md). + +Come chat with the community in the dedicated Matrix [room](https://matrix.to/#/#element-ios:matrix.org). + +## Support + +When you are experiencing an issue on ElementX iOS, please first search in [GitHub issues](https://github.com/vector-im/element-x-ios/issues) +and then in [#element-ios:matrix.org](https://matrix.to/#/#element-ios:matrix.org). +If after your research you still have a question, ask at [#element-ios:matrix.org](https://matrix.to/#/#element-ios:matrix.org). Otherwise feel free to create a GitHub issue if you encounter a bug or a crash, by explaining clearly in detail what happened. You can also perform bug reporting (Rageshake) from the Element application by shaking your phone or going to the application settings. This is especially recommended when you encounter a crash. + +## Copyright & License + +Copyright (c) 2022 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the [LICENSE](LICENSE) file, or at: + +[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \ No newline at end of file