> ## Documentation Index
> Fetch the complete documentation index at: https://developer.neurofit.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Install from source or manually

> Install the SDK without the hosted packages: xcframework and AAR files, wrapper package files, a source license, and the sample apps.

The quickstarts install from `sdk.neurofit.app`. Use this page when your build machine cannot reach it, when you
mirror packages in your own repository, or when you hold a source license. Downloads use your
[download token](/license-keys#download-token) through the `~/.netrc` entry from the
[iOS quickstart](/quickstart-ios#install).

## iOS: xcframework files

```bash theme={null}
curl --netrc -fLO https://sdk.neurofit.app/spm/1.0.0/NeurofitVitals.xcframework.zip
curl --netrc -fLO https://sdk.neurofit.app/spm/1.0.0/NeurofitVitalsUI.xcframework.zip   # Option A: the pre-built reading flow
unzip NeurofitVitals.xcframework.zip && unzip NeurofitVitalsUI.xcframework.zip
```

Add them to your app target under Frameworks, Libraries and Embedded Content, set to Embed and Sign, or reference
them from a local Swift package:

```swift Package.swift theme={null}
.binaryTarget(name: "NeurofitVitals", path: "Vendor/NeurofitVitals.xcframework"),
.binaryTarget(name: "NeurofitVitalsUI", path: "Vendor/NeurofitVitalsUI.xcframework"),
```

`NeurofitVitalsUI` links `NeurofitVitals` and does not contain it, so use both from the same version.

## Android: AAR files

Your own artifact repository can proxy `https://sdk.neurofit.app/maven`, with any username and the token as the
password. Point Gradle at your repository and nothing else changes.

Or download the AAR files (`https://sdk.neurofit.app/maven/com/neurofit/vitals-sdk/1.0.0/vitals-sdk-1.0.0.aar`, and
the same path for `vitals-sdk-ui`) and add their dependencies at these versions:

```kotlin app/build.gradle.kts theme={null}
dependencies {
  implementation(files("libs/vitals-sdk-1.0.0.aar"))
  // api scope in the SDK (types in its public API)
  implementation("androidx.camera:camera-view:1.5.0")
  implementation("androidx.activity:activity-ktx:1.11.0")
  implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.4")
  implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
  // implementation scope in the SDK (capture)
  implementation("androidx.camera:camera-core:1.5.0")
  implementation("androidx.camera:camera-camera2:1.5.0")
  implementation("androidx.camera:camera-lifecycle:1.5.0")

  // Option A: the pre-built reading flow and Jetpack Compose
  implementation(files("libs/vitals-sdk-ui-1.0.0.aar"))
  implementation(platform("androidx.compose:compose-bom:2026.06.01"))
  implementation("androidx.compose.runtime:runtime")
  implementation("androidx.compose.ui:ui")
  implementation("androidx.compose.foundation:foundation")
}
```

The Compose BOM raises `androidx.core` to 1.16.0 if your build has an older one.

## Wrapper package files

On a machine that reaches `sdk.neurofit.app` with the `.npmrc` from your quickstart, pack the package, then
install the file anywhere:

```bash theme={null}
npm pack @neurofit/vitals-react-native        # Capacitor: npm pack @neurofit/vitals-capacitor
npm install ./neurofit-vitals-react-native-1.0.0.tgz
```

For Flutter, download the package and depend on it by path:

```bash theme={null}
curl --netrc -fLO https://sdk.neurofit.app/pub/packages/neurofit_vitals/versions/1.0.0.tar.gz
mkdir -p vendor/neurofit_vitals && tar -xzf 1.0.0.tar.gz -C vendor/neurofit_vitals
```

```yaml pubspec.yaml theme={null}
dependencies:
  neurofit_vitals:
    path: vendor/neurofit_vitals
```

Each package carries both native SDKs (`ios/Frameworks` and `android/maven`), so there is nothing else to download.

## Source license

A source license ships the engine and SDK sources. Your build still activates with a key
([Source licenses](/license-keys#source-licenses)). The release scripts `sdk/tools/release/build_xcframework.sh` and
`sdk/tools/release/build_aar.sh` ship with the sources, so you can also build the binaries yourself.

### iOS source package

Add `ppgcore/sdk/ios` as a local package. It needs the `PpgCore` engine package at `ppgcore/ports/swift` next to it,
Swift tools 5.9 and Xcode 16 or newer, and builds in Swift 5 language mode. A build error about `internal import`
means an older Xcode.

| Product | Use |
| - | - |
| `NeurofitVitals` | The SDK as a dynamic library, when you use the core only. |
| `NeurofitVitalsStatic` | The same module linked statically. Use it with `NeurofitVitalsUI`. |
| `NeurofitVitalsUI` | The pre-built reading flow. |

```swift Package.swift theme={null}
dependencies: [
  .package(path: "../neurofit-vitals-sdk/ppgcore/sdk/ios")
],
targets: [
  .target(name: "YourApp", dependencies: [
    .product(name: "NeurofitVitalsStatic", package: "ios"),
    .product(name: "NeurofitVitalsUI", package: "ios")
  ])
]
```

<Warning>
  Never link `NeurofitVitalsUI` with the dynamic `NeurofitVitals` product. Your app would contain two copies of the
  SDK, each with its own activation, and the flow would end with `notActivated` although your app called
  `activate`.
</Warning>

Link one core product, not both. Debug builds of the sources accept a key that does not list your bundle identifier
([Debug builds](/license-keys#debug-builds)). The module bundles `PrivacyInfo.xcprivacy`.

### Android source modules

Include `:vitals-sdk`, and `:vitals-sdk-ui` for the pre-built flow, from the delivered Gradle project with
`includeBuild`, or copy the modules into your project. They compile the engine sources from `ppgcore/ports/kotlin` in
place. `:vitals-sdk-ui` applies the Compose compiler plugin (`org.jetbrains.kotlin.plugin.compose`), so declare it
at your Kotlin version if you copy the module.

### Running the tests

The iOS package's unit tests run on the Simulator, which has no camera, so a reading itself needs a device. Pick the
simulator by id, because a name such as `iPhone 15` can match several installed runtimes:

```bash theme={null}
cd ppgcore/sdk/ios
xcodebuild -scheme NeurofitVitals-Package \
  -destination "id=$(xcrun simctl list devices available | grep -m1 'iPhone 15 (' | sed -E 's/.*\(([0-9A-F-]+)\).*/\1/')" \
  test
```

## Sample apps

| Sample | Folder | What it shows |
| - | - | - |
| SwiftUI (iOS) | `sdk/samples/ios` | Activation, device support, camera access, a custom reading screen, and the pre-built flow through `.vitalsReadingFlow(isPresented:)`. |
| Android Views | `sdk/android/sample` | The same in Kotlin with plain Views, and the pre-built flow through `VitalsReadingFlowContract`, with its options built from Java. |
| Flutter | `sdk/wrappers/flutter/example` | A custom reading screen and the pre-built flow in one `main.dart`. |

The iOS and Android samples have their setup in their READMEs, and their keys must list
`com.neurofit.vitals.sample`. The Flutter example is the Dart code only: create its platform projects with
`flutter create .` in its folder, use a key that lists their identifiers, and pass it with
`--dart-define=NEUROFIT_VITALS_LICENSE_KEY=...`.

The iOS and Android samples ship with source releases, the Flutter example inside the `neurofit_vitals` package.
Request an evaluation build: [contact@neurofit.app](mailto:contact@neurofit.app).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.