{"id":19198448,"url":"https://github.com/virgilsecurity/demo-firebase-ios","last_synced_at":"2025-05-09T01:18:24.348Z","repository":{"id":85439947,"uuid":"129406782","full_name":"VirgilSecurity/demo-firebase-ios","owner":"VirgilSecurity","description":"[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.","archived":false,"fork":false,"pushed_at":"2019-03-12T17:13:56.000Z","size":19530,"stargazers_count":41,"open_issues_count":0,"forks_count":6,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-05-09T01:18:13.592Z","etag":null,"topics":["cryptography","e2ee","encryption","end-to-end-encryption","firebase","firebase-cloud-messaging","ios","ios-app","secured-by-virgil"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VirgilSecurity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-04-13T13:34:48.000Z","updated_at":"2025-02-18T13:18:06.000Z","dependencies_parsed_at":"2023-05-31T11:15:54.384Z","dependency_job_id":null,"html_url":"https://github.com/VirgilSecurity/demo-firebase-ios","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VirgilSecurity%2Fdemo-firebase-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VirgilSecurity%2Fdemo-firebase-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VirgilSecurity%2Fdemo-firebase-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VirgilSecurity%2Fdemo-firebase-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VirgilSecurity","download_url":"https://codeload.github.com/VirgilSecurity/demo-firebase-ios/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171289,"owners_count":21865299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","e2ee","encryption","end-to-end-encryption","firebase","firebase-cloud-messaging","ios","ios-app","secured-by-virgil"],"created_at":"2024-11-09T12:22:04.390Z","updated_at":"2025-05-09T01:18:24.329Z","avatar_url":"https://github.com/VirgilSecurity.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# End-to-end encrypted, HIPAA-compliant iOS chat app for Firebase.\nYou 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 ](https://virgilsecurity.com/wp-content/uploads/2018/07/Firebase-HIPAA-Chat-Whitepaper-Virgil-Security.pdf).\n\n[Also, we've created a helpful video on YouTube to walk you through the steps below and explains what you'll be doing for the next 10 minutes or so. Popcorn not included](https://www.youtube.com/watch?v=6zpzbcm_3I8).\n\n**This Demo is based on [Virgil Objective-C/Swift SDK](https://github.com/VirgilSecurity/virgil-sdk-x).** \n\nLooking for other client platforms? \n- [Android](https://github.com/VirgilSecurity/demo-firebase-android) is based on [Virgil Java (Android) SDK](https://github.com/VirgilSecurity/virgil-sdk-java-android)\n- [JavaScript (browser)](https://github.com/VirgilSecurity/demo-firebase-js) is based on [Virgil E3Kit Typescript/Javascript SDK](https://github.com/VirgilSecurity/virgil-e3kit-js). Our new client-side SDK.\n\n## Clone project\n```bash\ngit clone https://github.com/VirgilSecurity/demo-firebase-ios\ncd demo-firebase-ios\n```\n\n## Connect your Virgil and Firebase accounts\nIn 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.\n\n* **[Follow instructions here](https://github.com/VirgilSecurity/demo-firebase-func)**\n\n\u003e 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.\n\n## Add your Firebase function URL and Firebase project config to your app\n\n* **Copy your new Firebase function's URL**: go to the Firebase console -\u003e your project -\u003e Functions tab and copy your new function's url\n* **Go to Xcode -\u003e Firebase Chat iOS/Helpers/Virgil/VirgilHelper.swift and change variable jwtEndpoint to**:\n  ```\n  https://YOUR_FUNCTION_URL.cloudfunctions.net/api/generate_jwt\n  ```\n* Go back to your project's page in Firebase console, click the **gear icon** -\u003e **Project settings**\n* Click **Add app** and choose **\"iOS: Add Firebase to your iOS app\"**\n* Change the bundle ID to your own (or make one up), click **Register app**\n* **Download GoogleService-Info.plist** into the **Firebase Chat iOS** directory of this sample.\n\n## Install dependencies\nThe sample app uses several modules, including Virgil SDK and Firebase Firestore.\n\n\u003e **Cocoapods** manages dependencies for your Xcode projects. If you don't have it, install it with [Homebrew](http://brew.sh/):\n   ```bash\n   brew update\n   brew install cocoapods\n   ```\n\n* **Update dependencies**\nThe sample already has a Pod file with all required dependencies: run the following commands to update these dependencies:\n  ```bash \n  pod install\n  open Firebase\\ Chat\\ iOS.xcworkspace/\n  ```\n\n## Build and Run\nAt this point you are ready to build and run the application on your iPhone or Simulator.\n\n\u003e 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?](https://stackoverflow.com/questions/44384677/how-to-run-multiple-simulators-on-xcode-9)\n\n\u003e 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirgilsecurity%2Fdemo-firebase-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvirgilsecurity%2Fdemo-firebase-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirgilsecurity%2Fdemo-firebase-ios/lists"}