Skip to main content

Installation

Add the package and let the NitroUI CLI link it:

bun add nitro-device-info
bun run nitro-ui prepare

nitro-ui prepare finds the package through its nitro.json, generates its bindings with the app's Nitrogen, links its Swift package into the iOS build and its Kotlin sources into the Android runtime library.

Peer dependency​

The package needs nitro-ui-renderer 0.3.0 or later. On Android it reads the application context from the renderer's host, which NitroUI attaches before any JavaScript runs.

Align nitro-core​

The package depends on nitro-core 1.0.0-alpha.nightly.138.g43e09c161101 exactly. The NitroUI CLI requires every module to resolve the same nitro-core as the SDK.

warning

NitroUI 0.3.0 pins nightly .137. An app on a NitroUI release that pins another nightly must override both nitro-core and nitrogen in its package.json.

package.json
"overrides": {
"nitro-core": "1.0.0-alpha.nightly.138.g43e09c161101",
"nitrogen": "1.0.0-alpha.nightly.138.g43e09c161101"
}

Run bun install and bun run nitro-ui prepare again after adding the overrides.

Permissions​

None. The package adds no Android manifest permission, needs no runtime prompt, and declares no iOS required reason API. See Privacy and permissions for what is left out because of that.

Next​

Quick start.