We use Xcode Version 13.4.1 for development - that is the version that our linters require.
You must also use swift
5.7. You can check your swift
version with:
swift -version
swift-driver version: 1.62.15 Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)
- Clone the repository
cd
into the repository- Open the package and this will install the dependencies
swift build -v
swiftlint lint
For integration tests, we use a rippled
node in standalone mode to test XRPLSwift code against. To set this up, you can either run rippled
locally, or set up the Docker container natenichols/rippled-standalone:latest
for this purpose. The latter will require you to install Docker.
swift test -s BasicTests.PathTests/testContains
swift build
swift test --filter XRPLSwiftUTests
# sets up the rippled standalone Docker container - you can skip this step if you already have it set up
docker run -p 6006:6006 -it natenichols/rippled-standalone:latest
swift build
swift test --filter XRPLSwiftITests
docker build --platform=linux/amd64 --tag transia/swiftlint:latest -f swiftlint.dockerfile .
docker run --platform=linux/amd64 --rm -it transia/swiftlint:latest
docker push transia/swiftlint:latest
xcodebuild docbuild \
-scheme TARGET_NAME \
-derivedDataPath PATH_TO_SAVE_DERIVED_DATA_FOLDER \
-destination 'platform=iOS Simulator,name=iPhone 13'
You can see the complete reference documentation at XRPLSwift
docs. You can also generate them locally using $(xcrun --find docc) process-archive transform-for-static-hosting "$ARCHIVE" --hosting-base-path XRPLSwift --output-path ../docs
This updates docs/
at the top level, where GitHub Pages looks for the docs.
Use this repo to generate a new DefinitionsJson
file from the rippled source code. Instructions are available in that README.
- Your changes should have unit and/or integration tests.
- Your changes should pass the linter.
- Your code should pass all the tests on Github (which check the linter, unit and integration tests on Swift 5 tests).
- Open a PR against
main
and ensure that all CI passes. - Get a full code review from one of the maintainers.
- Merge your changes.
- Ensure that all tests passed on the last CI that ran on
main
.
NOW WE ARE READY TO PUBLISH! No new code changes happen manually now.
- Checkout
main
andgit pull
. - Create a new branch to capture updates that take place during this process.
git checkout -b <BRANCH_NAME>
- Run
npm run build
to triple check the build still works - Update the version in the
swift-version
file.
- Create a new PR from this branch into
main
and merge it. - Checkout
main
andgit pull
- Register your cocoapods account:
pod trunk register [email protected] 'Denis Angell' --description='macbook pro'
- Run
pod trunk push XRPLSwift.podspec --verbose
- This will actually publish the packages.
- Create a new branch to capture the updated packages from the release (
git checkout -b <BRANCH_NAME>
) - Make a PR to merge those changes into
main
NOW YOU HAVE PUBLISHED! But you're not done; we have to notify people!
- Pull the most recent changes to main locally.
- Run
git tag <tagname> -m <tagname>
, where<tagname>
is the new package and version (e.g.0.0.1
), for each version released. - Run
git push --follow-tags
, to push the tags to Github. - On Github, click the "releases" link on the right-hand side of the page.
- Click "Draft a new release"
- Click "Choose a tag", and choose a tag that you just created.
- Edit the name of the release to match the tag (IE <version>) and edit the description as you see fit.
- Repeat steps 19-21 for each release.
- Send an email to xrpl-announce.
We have a low-traffic mailing list for announcements of new XRPLSwift
releases. (About 1 email every couple of weeks)
If you're using the XRP Ledger in production, you should run a rippled server and subscribe to the ripple-server mailing list as well.