Home

Awesome

LibVCX Demo iOS Project for Alice

This iOS demo project code is based on vcx-skeleton-ios, and implements demo code for Alice on iOS simulator or actual devices. You can use any Faber demo in different wrappers (python or node) for testing. Internally, the application serializes and deserializes the vcx connection object between operations.

Note: If you checkout the develop branch, there is a more sophisticated demo project that utilizes non-secret wallet APIs to save/retrieve VCX objects. Moreover, it downloads messages from the cloud agent, and processes them according to it's context.

Prerequisites

Xcode

It requires the Xcode 11

Install Vcx framework

Run pod install from the root folder of the project. It's getting the Vcx framework from our private pod. The Vcx framework is written in Objective-C, so the project includes the Objective-C bridging header file (VcxDemo-Bridging-Header.h) to expose Objective-C framework in the Swift project. (Importing Objective-C into Swift)

Note: This project adopts the Combine framework in order to migrate existing Objective-C async callbacks to Future/Promise style architecture. This is implemented in the file VcxWrapper.swift, and they are used with a flatMap for sequencing asynchronouse operations in this demo application.

Steps to run Demo

Cloud Agent

You need to start NodeVCXAgency in the remote host with a specific IP address rather than localhost

Update the agncy_url field in the ViewController.swift file with your cloud agent's url

Indy Pool

You would also like to start the Indy Pool on a specific IP address with the same reason in the cloud agent. Alternatively, you may use some public Indy Pools available on the web.

Update genesis.txn file with the genesis transaction info of the indy pool you want to access.

Run the Alice Demo

  1. Run the Faber with a different demo application
  2. Click the Provision button to provision an agent, and initialize VCX.
  3. Copy the invitation from the Faber, and paste it in the Invitation field of the Alice Demo Application
  4. Click the Connection Request button
  5. After connection established, issue credential from Faber demo
  6. Click the Accept Offer button in the Alice Demo Application, you will get a credential in a moment
  7. In the Faber Demo, ask for proof request
  8. Click the Present Proof button. Faber will verify the proof and send the ack after that.
  9. Alice Demo Application will get an ack, and you are done.