Start with cloning repository to your PC. Open terminal, navigate to the folder where you want to store the application and execute
$ git clone https://github.com/VirgilSecurity/virgil-demo-messenger.git
$ cd virgil-demo-messenger
Virgil Messenger uses several modules, including Virgil PFS SDK. These packages are distributed via Carthage and CocoaPods. Since Carthage is a RECOMMENDED way to integrate those packages into the project, these application's dependencies are managed by it. Carthage integration is easy, convenient and you can simultaneously use CocoaPods to manage all other dependencies.
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
This example already has Carthage file with all required dependencies. All you need to do is to go to the project folder and update these dependencies.
$ cd PathToProjectFolder/virgil-demo-messenger
$ carthage bootstrap --platform iOS --no-use-binaries
At this point you are ready to build and run the application on iPhone and/or Simulator. We even created user for you to chat with (username "test"). Please, be nice and polite with him.
You can try this messenger without any further steps using servers and credentials hardcoded in this repository, however, it's very easy to setup your own Virgil & Twilio applications, Twilio token server and then start your own, separate messenger!
The messenger uses virgil-demo-twilio as a server to obtain Twilio Token and make new Virgil and Twilio users. You can make your own server. To do this you'll need to:
- Create your own account in Dashboard to get Virgil Access Token and App Private key.
- Set up your server to provide Twilio Tokens creation, new users registration using Virgil SDK and Passwordless authentication
- Change server endpoints and Virgil Access Token in client messenger app. All of these you can find in the
VirgilHelper
class.
To build this sample were used next third-party frameworks
- Twilio Programmable Chat - transmitting messages and handling channel events.
- Chatto - representing UI of chatting.
- Virgil PFS SDK - encrypting, decrypting messages and passwordless authentication.
- PKHUD - reimplementing Apple's HUD.
Virgil Security has a powerful set of APIs, and the documentation is there to get you started today.
- Get Started documentation
- Guides
- Reference API
Our developer support team is here to help you. You can find us on Twitter or send us email [email protected]