Licensing at a glance. The license is perpetual, with no per-user or per-scan fees. It includes updates until a
date written in your key (
updatesUntil), and the builds you ship keep working after it.
neurofit.app/vitals-sdkInstalling the key
Callactivate early in every launch, before you start a session. The key is a single string.
activate throws (or rejects) licenseInvalid when the key is not accepted
(licenseInvalid reasons). Natively it is synchronous and safe from any thread. The key
is held in memory only, and until activate succeeds, starting a session throws notActivated. It checks
Bundle.main.bundleIdentifier on iOS and the application id (context.packageName) on Android. It returns the
key’s warnings, which stay empty unless a debug build relaxed a check.
Keep the key out of git: an uncommitted xcconfig, a Gradle property from ~/.gradle/gradle.properties or CI
secrets, a --dart-define, or your config system. It works only for your app identifiers, so a leak does not let
anyone else ship the SDK, but it is still licensed material.
Download token
NEUROFIT issues a download token to your organization. Your build tools use it to fetch the packages fromsdk.neurofit.app. It never ships in your app, and the SDK never contacts that host.
The token is the password, and any username works. Keep it out of git like any credential. Ask for one token per CI
system to revoke them separately. If a token leaks, ask NEUROFIT to revoke it and issue a new one. A
401 or
Unauthorized while resolving means the token is missing or revoked
(Build and integration).
What updatesUntil means
updatesUntil is the end of your maintenance period:
- Every SDK build has a build date, given in the changelog.
- A key accepts any SDK build dated on or before its effective date: the earlier of your
updatesUntiland the certificate’smaxUpdatesUntil. If the certificate’s date comes first, NEUROFIT re-issues your key under a newer issuing key, keeping yourupdatesUntil. - A build released after the effective date refuses the key with
licenseInvalid, and the reason names the date. - Builds you already ship keep working. With a paid key, nothing expires inside installed apps.
updatesUntil.
Trial keys
A trial key unlocks the SDK until a set moment, written in the key asexpiresAt in UTC (for example
2026-10-31T23:59:59Z). From then on the SDK stops starting readings. Paid keys have no expiresAt.
- The end is checked against the device clock, offline, by
activateand by everystart(), in debug builds too. - After the end, both throw
licenseInvalidwith the reasonthe trial key expired on 2026-10-31 23:59 UTC. A session that has already started runs to its end, including the readings it restarts by itself after a cancel. - Every app that carries the trial key stops starting readings at its end, installed copies included. To continue, ship your paid key in an app update before then.
- The check is offline, so a device whose clock is set back keeps a trial key working. The end is a commercial boundary set by your trial agreement, not copy protection.
Debug builds
In development the app-identifier check can relax, soactivate succeeds under identifiers the key does not list:
- Android decides at runtime: a debuggable app (
ApplicationInfo.FLAG_DEBUGGABLE) activates, a release build is rejected. - iOS binary (the hosted package, also inside the React Native, Flutter and Capacitor packages) never relaxes it, so the key must list every bundle identifier you run, development ones included.
- iOS from source relaxes in your Debug configuration (
#if DEBUGinsideNeurofitVitals).
activate tells you. It returns a warning in warnings
(iOS, Android,
wrappers) and logs it, in the Xcode console or in Logcat with the tag
NeurofitVitals. The React Native, Flutter and Capacitor packages also print it in development. For example:
warnings next to your activation status on a debug screen makes it easy to spot. A
trial key’s end never relaxes.
Several app identifiers
One key can list several identifiers (production, staging, a white-label variant). Ask NEUROFIT to include every identifier you ship under. Adding one later means a new key, and the old key keeps working.licenseInvalid reasons
The reason is a short English sentence for your logs (SwiftlicenseInvalid(reason:), Kotlin
LicenseInvalid(reason), the wrappers’ message). It names the check that failed:
Security review
How verification works (for security review)
How verification works (for security review)
How a key is signed. NEUROFIT signs your license with an issuing key. Your key carries that issuing key’s
certificate, signed by one of two offline root keys,
root-a or root-b. The SDK embeds only the two root public
keys. It checks the root’s signature on the certificate, then the issuing key’s signature on your license, so
NEUROFIT can change issuing keys without an SDK release.Key format. NFV2.<certificate>.<root signature>.<payload>.<issuer signature>. Each part after NFV2 is
base64url without padding. Both signatures are ECDSA P-256 with SHA-256 in strict DER, with nothing after the
signature. The issuer signature also covers the certificate, so a payload cannot move under another certificate.Verification order. The first failing check throws
licenseInvalid:- Shape: leading and trailing ASCII whitespace (space, tab, CR, LF) is trimmed. The rest is pure ASCII, five
dot-separated parts, the first
NFV2, the others non-empty canonical base64url without padding. - The certificate names a root compiled into this SDK, whose signature verifies over the bytes
NFV2.<certificate>. - The certificate’s fields are as above (
algexactlyES256,vthe integer1,puba P-256 key, dates exactlyYYYY-MM-DD). - This SDK build does not refuse the issuing key.
- The issuing key’s signature verifies over the bytes
NFV2.<certificate>.<root signature>.<payload>. - The payload’s fields are as above, and its
kidequals the certificate’s. - The SDK build date is on or before the earlier of
updatesUntilandmaxUpdatesUntil(string comparison). - The app identifier is in
apps, compared exactly and case-sensitively. - For a trial key, the device clock is still before
expiresAt. Only this check reads the clock, and debug builds run it even when they relax check 8.
expiresAt. For new builds:- A new SDK build can refuse an issuing key. If one were exposed, that release would ship with re-issued keys for every licensee under maintenance.
- An issuing key never unlocks an SDK built after its
maxUpdatesUntil, so certificates are kept short (two years by default). - The two roots back each other up: if one were lost, the other keeps certifying issuing keys.
Source licenses
A source license ships the engine and SDK sources. Your build still callsactivate with a key of type source,
which verifies the same way (Install from source or manually). You can also
replace the root keys or the check itself: the license agreement, not the key, governs your use.
Questions
Licensing questions go to contact@neurofit.app. Include your licensee name and thekid from your key.