Installation
bun add nitro-ui-admob
bun run nitro-ui prepare
The NitroUI CLI finds the package through its nitro.json, generates its bindings with the app's Nitrogen, links its Swift package into the iOS build, and links its Kotlin sources and Gradle dependencies into the Android runtime library. Run bun run nitro-ui prepare again after upgrading the package.
Peer dependencies
| Package | Range |
|---|---|
nitro-ui-renderer | >=0.3.0 |
react | >=19 |
Pin 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, so an app whose NitroUI release pins another nightly must override both packages in its package.json:
"overrides": {
"nitro-core": "1.0.0-alpha.nightly.138.g43e09c161101",
"nitrogen": "1.0.0-alpha.nightly.138.g43e09c161101"
}
:::warning NitroUI 0.3.0 pins .137
NitroUI 0.3.0 pins nightly .137. Without the overrides above, the app resolves two nitro-core versions, which the NitroUI CLI rejects.
:::
Native dependencies
You do not add the ads SDKs yourself; the package declares them.
| Platform | Added by the package |
|---|---|
| iOS | GoogleMobileAds from swift-package-manager-google-mobile-ads, 13.13.0 or later. Minimum iOS 16. |
| Android | com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk:1.7.0 and androidx.lifecycle:lifecycle-process:2.8.7 (for app open ads). |
On Android the Next-Gen SDK depends on Cronet 500.1.0, so the package excludes NitroUI's org.chromium.net:cronet-embedded, whose classes would otherwise be duplicated.
Next: native setup.