Go to file
Francisco Gindre 3e2050d0f0
Swiftlint (#5)
* Swiftlint + tests

* Added Swiftlint to README.md
2019-10-18 17:09:13 -03:00
Example Carthage Example project 2019-09-10 20:37:53 -03:00
ZcashLightClientKit Swiftlint (#5) 2019-10-18 17:09:13 -03:00
ZcashLightClientKit.xcodeproj Swiftlint (#5) 2019-10-18 17:09:13 -03:00
ZcashLightClientKitTests Swiftlint (#5) 2019-10-18 17:09:13 -03:00
filelists Block downloading + storing (#4) 2019-10-18 15:45:19 -03:00
rust Set up a Swift shim to the Rust FFI 2019-07-02 10:02:21 +01:00
.gitignore Block downloading + storing (#4) 2019-10-18 15:45:19 -03:00
.swiftlint.yml Swiftlint (#5) 2019-10-18 17:09:13 -03:00
Cargo.lock Implement remainder of FFI interface 2019-06-28 10:09:53 +01:00
Cargo.toml Implement remainder of FFI interface 2019-06-28 10:09:53 +01:00
Cartfile Block downloading + storing (#4) 2019-10-18 15:45:19 -03:00
Cartfile.resolved Block downloading + storing (#4) 2019-10-18 15:45:19 -03:00
LICENSE Initial repository 2019-05-04 13:23:24 -04:00
README.md Swiftlint (#5) 2019-10-18 17:09:13 -03:00
ZcashLightClientKit.modulemap Block downloading + storing (#4) 2019-10-18 15:45:19 -03:00
ZcashLightClientKit.podspec Block downloading + storing (#4) 2019-10-18 15:45:19 -03:00
build_librustzcash.sh Cocoapods Support + Example Project 2019-09-09 12:30:38 -03:00
prepare.rb Cocoapods Support + Example Project 2019-09-09 12:30:38 -03:00
zcash.swiftformat Swiftlint (#5) 2019-10-18 17:09:13 -03:00

README.md

Zcash iOS Framework

A Zcash Lightweight Client SDK for iOS

Build dependencies

Install Rust, and then cargo-lipo:

$ cargo install cargo-lipo
$ rustup target add aarch64-apple-ios x86_64-apple-ios

Cocoapods Support

use_frameworks!

pod 'ZcashLightClientKit' 

Carthage support

Add ZcashLightClientKit to your Cartfile

Testing

Currently tests depend on a lightwalletd server instance runnning locally or remotely to pass. To know more about running lightwalletd, refer to its repo https://github.com/zcash-hackworks/lightwalletd

Pointing tests to a lightwalletd instance

Tests use Sourcery to generate a Constants file which injects the lightwalletd server address to the test themselves

Installing sourcery

refer to the official repo https://github.com/krzysztofzablocki/Sourcery

Setting env-var.sh file to run locally

create a file called env-var.sh on the project root to create the LIGHTWALLETD_ADDRESS environment variable on build time.

export LIGHTWALLETD_ADDRESS="localhost%3a9067"

Integrating with CD/CI

The LIGHTWALLETD_ADDRESS environment variable can also be added to your shell of choice and xcodebuild will pick it up accordingly.

We advice setting this value as a secret variable on your CD/CI environment when possible

Swiftlint

We don't like reinveing the wheel, so be gently borrowed swift lint rules from AirBnB which we find pretty cool and reasonable.

Troubleshooting

_function_name referenced from...

if you get a build error similar to _function_name referenced from...

  • on your project root directory *
  1. remove the 'Pods' directory rm -rf Pods/
  2. delete derived data and clean
  3. run pod install
  4. build

License

Apache License Version 2.0