Skip to main content
Before writing any measurement code, you need the SDK package in your project and the correct system permissions granted so the OS allows camera access during a scan. This page walks through both steps for iOS and Android. The whole process takes under ten minutes on a clean project.

Prerequisites

License Key

Obtain your license key from Neurofit after signing a license agreement. See Licensing for how to get one.

iOS Requirements

Xcode 15 or later. Deployment target iOS 15+. A physical device is required for camera-based scanning — the iOS Simulator does not have a rear camera.

Android Requirements

Android Studio Hedgehog (2023.1.1) or later. minSdk 24 (Android 7.0) or higher. A physical device or emulator with camera support.

Install the Package

The iOS SDK is distributed as a Swift Package. Add it to your project using Xcode’s built-in package manager.
1

Open the Add Packages dialog

In Xcode, choose File → Add Package Dependencies… (or File → Add Packages in older Xcode versions).
2

Enter the package URL

Paste the Neurofit Vitals package URL into the search field:
3

Select a version rule

Choose Up to Next Major Version with 1.0.0 as the minimum. Click Add Package.
4

Add to your app target

When prompted, check the box next to NeuroFitVitals and confirm your app target is selected. Click Add Package to finish.

Required Permissions — Info.plist

The SDK opens the rear camera during a scan. Add the following key to your Info.plist so the OS can show a permission prompt with a meaningful reason string:
If NSCameraUsageDescription is absent, iOS will terminate your app the first time the SDK requests camera access. Do not omit it.

Import

Add the import at the top of any Swift file that uses the SDK:

Minimum OS Version Summary

Securing Your License Key

Your license key is required during SDK initialization (see Quickstart). Keep it out of your version control system and avoid hard-coding it as a plain string in production builds.
Store the license key in an environment variable injected at build time, a secrets manager, or a remote config service that your app fetches at launch. This prevents the key from being extracted from a committed source file or a decompiled binary.