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.
It requires the Xcode 11
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.
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
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 Faber with a different demo application
- Click the
Provision
button to provision an agent, and initialize VCX. - Copy the invitation from the Faber, and paste it in the Invitation field of the Alice Demo Application
- Click the
Connection Request
button - After connection established, issue credential from Faber demo
- Click the
Accept Offer
button in the Alice Demo Application, you will get a credential in a moment - In the Faber Demo, ask for proof request
- Click the
Present Proof
button. Faber will verify the proof and send the ack after that. - Alice Demo Application will get an ack, and you are done.