Blockstack iOS SDK v0.2.0


#1

The iOS SDK has gotten a big update with new features and fixes for many issues. Most notable is the addition of Encryption/Decryption, along with a refactor to allow for multiple gaia connections, better separate logic, prevent error states, and guard against crashes.

Changes in this release

Added

  • This change log.
  • Sign out functionality that allows clearing of SFAuthenticationSession browser storage. This allows users to use multiple accounts without having to reset the device/emulator. Also fixes an issue where users who get into a bad state during onboarding cannot recover.
  • EllipticJS class which allows computing ECDH shared secret and getting a public key from private, on the secp256k1 curve.
  • Encryption.encryptECIES and Encryption.decryptECIES methods which allow encryption/decryption of text or byte streams.
  • Unit tests for Encryption via Quick/Nimble
  • CircleCI integration for automated testing on all branches.
  • GaiaHubSession has been added to allow multiple gaia connections. The shared Gaia object can hold numerous connections. It is not possible to create a GaiaHubSession object without a valid gaia config, fixing some error states. This object handles getting from and putting to a Gaia hub.

Changed

  • Swift 4.0 syntax.
  • Removed secp256k1 pod. The functionality it was useful for is now covered by EllipticJS.
  • Class extensions are all now in “Extensions.swift”, reducing project size.
  • Crash-proofing and refactoring of code around the project for simplicity and separation.
  • The included example app is functional (showcases sign in and sign out, along with putting and getting a file). No longer requires you to deploy a web app.
  • Blockstack and BlockstackInstance are merged.
  • Gaia is now responsible for connecting to and managing GaiaHubSessions, along with saving and retrieving gaia configs, via static methods.
  • Gaia.getOrSetGaiaSession is now Gaia.ensureHubSession.

Give it a whirl! Comment here with feedback, file an issue on github, and say hi on Slack! Look out for our next release, v0.3.0, in a couple weeks!


#2

Great release update description @shreyas :+1: