Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ZhipLogo

Build Status

License MIT

Zhip

This is the open source code code for the iOS wallet app Zhip (App Store link). Zhip is the worlds first iOS wallet for Zilliqa. It uses the Zilliqa Swift SDK "Zesame".

Getting started

  • Xcode 12 (Xcode 11 might work as well.)
  • Clone this repo

You can thus get started right away:

open Zhip.xcodeproj

Optional

Architecture

This app uses a novel architecture named SLC: Single-Line Controller, I strongly suggest that you begin by reading this medium article about it and make sure to read the second part as well.

It is a kind of MVVM where the UIViewController in most cases is one single line and all view and flow of data logic is put in the ViewModel. It also uses the Coordinator pattern.

Dependencies

You will find all dependencies inside the list of SPM packages in Xcode -> Project Zhip -> Swift Packages (or by Show the Project navigator and under Swift Package Dependencies), but here are the most important ones.

Zesame

This iOS wallet is entirely dependent on the Zilliqa Swift SDK known as Zesame, without that this wallet couldn't exist. All cryptographic methods and all interaction with the Zilliqa Ledger through their API is done using Zesame.

EllipticCurveKit

In turn, Zesame is dependent on the Elliptic Curve Cryptography of EllipticCurveKit, for the generation of new wallets, restoration of existing ones, the encryption of your private keys into keystores and the signing of your transactions using Schnorr Signatures.

Other

Privacy

When starting the app for the first time you will be asked to opt-in or opt-out for crashreporting.

If you chose to opt in and would like to opt out at a later time - or the other way around - you can do so from Settings at any time.

If you choose to opt out Crashlytics will not be initialized and no crash reports will be sent from your app.

If you chose to opt in it will make it easier to fix potential bugs in the apps, especially those crucial ones resulting in crashes. Crashlytics has been added for this sole purpose, make the app more reliable and less likely to crash.

Disabled by default

Open the file Zhip-Info.plist and you will see that the value for the key firebase_crashlytics_collection_enabled is set to false, which is the documented way of turning of crash reports by default

When the app starts it checks if you accepted crash reporting, you can verify this by looking in the file Bootstrap.swift

func setupCrashReportingIfAllowed() {
    guard Preferences.default.isTrue(.hasAcceptedCrashReporting)

And searching in the code for "for .hasAcceptedCrashReporting" shows when and how the boolean flag hasAcceptedCrashReporting gets written.

Analytics not used

In the function setupCrashReportingIfAllowed in Bootstrap.swift you will see calls to Firebase:

    FirebaseConfiguration.shared.setLoggerLevel(FirebaseLoggerLevel.min)
    FirebaseApp.configure()
    Fabric.with([Crashlytics.self])

Firebase analytics is not used, but Crashlytics is setup using Firebase.

You can search for Analytics.logEvent or Analytics.setScreenName in the code and you will not find any search results.

Donate

This free wallet and the foundation Zesame its built upon has been developed by the single author Alexander Cyon without paid salary in his free time - approximatly a thousand hours of work since May 2018 (see initial commit in Zesame).

Any donation would be much appreciated:

  • ZIL: zil108t2jdgse760d88qjqmffhe9uy0nk4wvzx404t
  • BTC: 3GarsdAzLpEYbhkryYz1WiZxhtTLLaNJwo
  • ETH: 0xAB8F0137295BFE37f50b581F76418518a91ab8DB
  • NEO: AbbnnCLP26ccSnLooDDcwPLDnfXbVL5skH

License

Zhip is released under the MIT License.

Acknowledgments

Sound effect when transaction is sent is called "RADAR" by Mattias "MATTIX" Lahoud under CreativeCommons, thanks a lot!