Contains common utility functions and extensions.
[List is not complete]
- iOS 16+
- Xcode 12+
- Jazzy
[sudo] gem install jazzy
- Brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Make
brew install make
- Swiftlint
brew install swiftlint
Following our style guide should:
- Make it easier to read and begin understanding the unfamiliar code.
- Make code easier to maintain.
- Reduce simple programmer errors.
- Reduce cognitive load while coding.
- Keep discussions on diffs focused on the code's logic rather than its style.
Note that brevity is not a primary goal.
// swift-tools-version:5.1
import PackageDescription
let package = Package(
name: "YourTestProject",
dependencies: [
.package(url: "[email protected]:shortcut/shortcut-foundation-ios.git", from: "1.0.2")
],
targets: [
.target(name: "YourTestProject", dependencies: ["ShortcutFoundation"])
]
)
And then import wherever needed: import ShortcutFoundation
- Using Xcode 12 or greater go to File > Swift Packages > Add Package Dependency
- Paste the project URL:
[email protected]:shortcut/shortcut-foundation-ios.git
- Click on next and select the project target
If you want to know more, please check the following links:
How to use
Creating Swift Packages
After successfully retrieved the package and added it to your project, just import ShortcutFoundation
and you can get the full benefits of it.
import ShortcutFoundation
...
- Clone the repository
- Create your feature branch
- Open the
Package.swift
file - Perform your changes, debug, run the unit tests
- Make sure that all the tests pass and there are no Xcode warnings or lint issues
- Open a pull request
We have added a few helpers to make your life easier:
make build
to build the project via command linemake test
to test the project via command linemake jazzy
to generate the documentation and output to theDocs
foldermake lint
to execute Swiftlintmake fix-lint
to auto-correct Swiftlint warnings