- Fork and clone SwiftCrossUI
- Install the required dependencies as detailed in the readme
- Open Package.swift to open the package in Xcode and you're ready to code, have fun
- Look through the issues on GitHub and choose an issue to work on (or open one if you have an idea)
- Leave a comment on the issue to let people know that you're working on it
- Make necessary changes to the codebase
- Open a PR, making sure to reference the issue that your changes address
- If a maintainer requests changes, implement the changes
- A maintainer will merge the changes and the issue can be closed
- Thank you for improving SwiftCrossUI!
- Make sure you have documented any new code and updated existing documentation as necessary
- Make sure that you haven't introduced any new warnings
- Make sure that the code builds, and the example works correctly
- If you are adding a new feature, consider adding an example usage of it to the example
- Run
format_and_lint.sh
(requires installingswift-format
andswiftlint
)
Here are a few things to keep in mind while working on the code.
- Do not directly modify a file that has a corresponding
.gyb
template file (which will be in the same directory). Instead, modify the template file and then run./generate.sh
to build all of the templates. To learn more about gyb read this post - Make sure to avoid massive monolithic commits where possible
- 4 space tabs
- Add comments to any code you think would need explaining to other contributors
- Document all methods, properties, classes, structs, protocols and enums with documentation comments (no matter how trivial, if it's trivial, you can just keep the documentation comment short). In Xcode you can press option+cmd+/ when your cursor is on a declaration to autogenerate a template documentation comment (it mostly works)
- Avoid using shorthand when the alternative is more readable at a glance