facebit-ios
iOS companion application for FaceBit, a platform for smart face masks
Science Score: 18.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.7%) to scientific vocabulary
Keywords
Repository
iOS companion application for FaceBit, a platform for smart face masks
Basic Info
- Host: GitHub
- Owner: ka-moamoa
- License: gpl-3.0
- Language: Swift
- Default Branch: master
- Homepage: https://facebit.health
- Size: 44.3 MB
Statistics
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 1
- Releases: 0
Topics
Metadata Files
README.md
Introduction
The FaceBit Companion App is a iOS/macOS application that manages sensor data from a FaceBit device. The app collects, stores, and processes data into insights that can be presented to the user of FaceBit.
The application is built as a Catalyst application which allows the same code to run on both iOS and MacOS. All external packages are managed with Swift Package Manager.
MacOS App
Running macOS Application (No XCode- Release)
- Download the latest version from the Releases section of this repository.
- May require security permission. System Preferences->Security & Privacy->General->Allow Applications
Running MacOS or iOS Application (XCode - Development)
- On macOS 11+, download the latest version of XCode from the AppStore
- Clone this repository
- Open
app/FaceBit Companion.xcode.projin XCode - Update the app signing to your Apple Id
- Select My Mac or iOS device from the device drop down in XCode's tool bar.
- Run using Cmd+r or run button in the top left.

Note: Requires a active Apple Developer Account for iOS development Note: Bluetooth is not supported on iOS Simulators. The application will run on a simulator but you will not be able to interact with the FaceBit Sensor Board.

App Functionality
Homepage
The homepage contains a demonstration of a consumer application, displaying high level information about the device and health metrics. More widget can be developed by exploring the code in Views/MyFaceBit/Metrics.
Connect FaceBit Sensor
Following instruction in the Embedded Firmware repository for setting up the FaceBit Sensor.
* Upon app start the device will search for the FaceBit device (broadcasted name SMARTPPE)
* The home page will display active when connected and the status indication will be filled.
* To reconnect, press the status indication to start the bluetooth search.

Data Collection
Data is stored in a local SQLite database. Raw readings on the device are stored in a transactional table. To explore the database open the settings tab and select Open SQL Database (macOS) or Share SQLite Database (iOS). SQLite DB Browser is a free cross-platform application for interfacing with SQLite Databases.

Event Recording
Event recording is used to tag data with events for data exploration. Access event recording from Settings->Record Events with the FaceBit Sensor Board connected. Enter event metadata and press Start Event. Perform the event (e.g. Deep Breathing) and then select Stop Event.
When a event is started a new event record is stored in the database. When Stopped, all transactional recording between the start and end time are updated (tagged) with the event. See the Python exploration below for accessing events and plotting.

Data Exploration
SQLite was selected as the datastore for easy access to any programming language or tool for data exploration.
Python
data-exploration/ contains a Jupyter Notebook for reading a SQLite Database and plotting temperature and pressure data of all event. To Run:
* Create a new Python environment
* e.g. from the data-exploration directory, run: conda env create -f env.yml
* Open the jupyter notebook:
* With Visual Studio Code
* With Jupyter server: run jupyter notebook from the data-exploration directory.
* Update database path in the first cell of the notebook
* Note: if using macOS just update the username.
Troubleshooting
MacOS Version
Since the application is built using Catalyst which is a new feature of Apple ecosystem development, macOS Big Sur (11) or above is required to run the application on Mac.
MacOS Running
Occasionally when developing on macOS, The application does not properly close when stopping the application in Xcode and the following error is displayed. To fix, open Activity Monitor and search facebit and force quit the application.

Barometer Initialization
Currently, there is a issue with the barometer initializing on the FaceBit Sensor Board. For the best results, run the device using J-Link and powered by battery. Once running, you can disconnect the device from the J-Link.
Owner
- Name: Ka Moamoa
- Login: ka-moamoa
- Kind: organization
- Location: Evanston, IL
- Website: http://kamoamoa.com/
- Repositories: 4
- Profile: https://github.com/ka-moamoa
Mobile and Ubiquitous Computing Lab
Citation (CITATION.bib)
@article{curtiss2021facebit,
title={FaceBit: Smart Face Masks Platform},
author={Curtiss, Alexander and Rothrock, Blaine and Bakar, Abu and Arora, Nivedita and Huang, Jason and Englhardt, Zachary and Empedrado, Aaron-Patrick and Wang, Chixiang and Ahmed, Saad and Zhang, Yang and Alshurafa, Nabil and Hester, Josiah},
journal={Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies},
volume={5},
number={4},
articleno={151},
numpages={44},
year={2021},
publisher={ACM New York, NY, USA},
url = {https://doi.org/10.1145/3494991},
doi = {10.1145/3494991}
}
GitHub Events
Total
Last Year
Dependencies
- fastlane >= 0
- CFPropertyList 3.0.3
- addressable 2.7.0
- atomos 0.1.3
- aws-eventstream 1.1.0
- aws-partitions 1.416.0
- aws-sdk-core 3.111.0
- aws-sdk-kms 1.41.0
- aws-sdk-s3 1.87.0
- aws-sigv4 1.2.2
- babosa 1.0.4
- claide 1.0.3
- colored 1.2
- colored2 3.1.2
- commander-fastlane 4.4.6
- declarative 0.0.20
- declarative-option 0.1.0
- digest-crc 0.6.3
- domain_name 0.5.20190701
- dotenv 2.7.6
- emoji_regex 3.2.1
- excon 0.78.1
- faraday 1.3.0
- faraday-cookie_jar 0.0.7
- faraday-net_http 1.0.1
- faraday_middleware 1.0.0
- fastimage 2.2.1
- fastlane 2.171.0
- gh_inspector 1.1.3
- google-api-client 0.38.0
- google-cloud-core 1.5.0
- google-cloud-env 1.4.0
- google-cloud-errors 1.0.1
- google-cloud-storage 1.29.2
- googleauth 0.14.0
- highline 1.7.10
- http-cookie 1.0.3
- httpclient 2.8.3
- jmespath 1.4.0
- json 2.5.1
- jwt 2.2.2
- memoist 0.16.2
- mini_magick 4.11.0
- mini_mime 1.0.2
- multi_json 1.15.0
- multipart-post 2.0.0
- nanaimo 0.3.0
- naturally 2.2.0
- os 1.1.1
- plist 3.6.0
- public_suffix 4.0.6
- rake 13.0.3
- representable 3.0.4
- retriable 3.1.2
- rouge 2.0.7
- ruby2_keywords 0.0.2
- rubyzip 2.3.0
- security 0.1.3
- signet 0.14.0
- simctl 1.6.8
- slack-notifier 2.3.2
- terminal-notifier 2.0.0
- terminal-table 1.8.0
- tty-cursor 0.7.1
- tty-screen 0.8.1
- tty-spinner 0.9.3
- uber 0.1.0
- unf 0.1.4
- unf_ext 0.0.7.7
- unicode-display_width 1.7.0
- word_wrap 1.0.0
- xcodeproj 1.19.0
- xcpretty 0.3.0
- xcpretty-travis-formatter 1.0.1
- swiftformat 0.45.6
- github.com/JWAutumn/ACarousel 0.2.0
- github.com/groue/GRDB.swift 5.5.0
- github.com/siteline/SwiftUI-Introspect 0.1.3
- github.com/timbersoftware/SwiftUIRefresh 0.0.3