[DEPRECATED] See https://github.com/VirgilSecurity/demo-e3kit-ios and https://github.com/VirgilSecurity/virgil-e3kit-firebase-func for up-to-date code. -- A simple iOS application that demonstrates how the end-to-end encryption works. The application uses firebase as a backend service for authentication and chat messaging.
You can reuse this sample in any Firebase project where you want to end-to-end protect user data, documents, images using Virgil’s end-to-end encryption. If you’re working on a project that needs to be HIPAA-compliant, see our whitepaper for more technical and legal details .
This Demo is based on Virgil Objective-C/Swift SDK.
Looking for other client platforms?
git clone https://github.com/VirgilSecurity/demo-firebase-ios
cd demo-firebase-ios
In order for the app to work, you need to deploy a Firebase function that gives out Virgil JWT tokens for your authenticated users. You’ll also need to create a Firestore database with a specific rule set.
You only need to do this once - if you already did it earlier or for your Android or JavaScript clients, you don’t need to do it again.
https://YOUR_FUNCTION_URL.cloudfunctions.net/api/generate_jwt
The sample app uses several modules, including Virgil SDK and Firebase Firestore.
Cocoapods manages dependencies for your Xcode projects. If you don’t have it, install it with Homebrew:
brew update
brew install cocoapods
pod install
open Firebase\ Chat\ iOS.xcworkspace/
At this point you are ready to build and run the application on your iPhone or Simulator.
You will want to try your new chat app with 2 users. Not sure how to run 2 simulators? Check out How to run multiple simulators on Xcode 9?
Remember, the app deletes messages right after delivery (it’s a HIPAA requirement to meet the conduit exception). If you want to see encrypted messages in your Firestore database, run only 1 app instance, send a message to your chat partner and check Firestore DB’s contents before opening the other user’s app to receive the message. If you don’t want to implement this behavior in your own app, you can remove it from this sample.