Installation & Requirements
Requirements
react-native-kernel requires the New Architecture (TurboModules / Fabric). There is no legacy-bridge fallback — every native module in this package is written against Codegen only.
Declared range (peerDependencies) | Notes | |
|---|---|---|
| React Native | ≥ 0.74.0 | Must have the New Architecture enabled. Developed & verified end-to-end against 0.87.1 — see the note below. |
| React | ≥ 18.2.0 | Nothing here uses React 19-only APIs; the actual floor is whatever your React Native version itself requires. Verified against 19.2.3. |
Android minSdkVersion | 24 (Android 7.0) | |
| iOS deployment target | 15.1 | Set by the React Native version you build with, not by this package |
react-native-kernel has no runtime dependencies of its own — every feature is built directly on platform APIs, so there’s nothing else to install and no third-party version-compatibility matrix to track.
Why 0.74, and not “any version with TypeScript support”? TypeScript
availability isn’t actually what gates this package — React Native has
supported TypeScript since 0.71’s default template (and via community
templates well before that). The real constraint is the New
Architecture: every native module here is TurboModule/Codegen-only, with
no legacy-bridge implementation, and useNetwork()/useBattery()
specifically depend on Codegen’s TurboModule event emitters
(EventEmitter<T>).
That feature has a rougher history than the New Architecture in general:
- Codegen had confirmed bugs emitting events from TurboModules on RN 0.70.5 — this is why the floor isn’t lower than 0.74.
- TypeScript’s own type definitions for Codegen’s
EventEmitter(PR #46484 ) landed September 2024, which lines up with the 0.76 release window, not 0.74. Since this package’s specs are TypeScript (not Flow), 0.74 and 0.75 are declared but unconfirmed for the TS-side Codegen path specifically — they may simply fail to generate the native spec for the event-emitting methods. 0.76+ is on firmer ground.
Only React Native 0.87.1 / React 19.2.3 has actually been built and run end-to-end (both iOS and Android) so far. Treat the range as: 0.76+ should work, 0.74–0.75 is a declared-but-unverified guess, and 0.87.1 is the only version actually confirmed.
Install
npm
npm install react-native-kerneliOS
TurboModules autolink through CocoaPods, but you still need to install pods after adding the package:
cd ios && pod installAndroid
No extra step — Gradle’s autolinking picks up the module automatically the next time you build.
Enable the New Architecture
If your app was scaffolded before the New Architecture became the default (React Native 0.76+), turn it on explicitly:
newArchEnabled=true# RCT_NEW_ARCH_ENABLED=1 pod installPermissions this package declares for you
The native module ships its own AndroidManifest.xml with the permissions
its default behavior needs. You don’t add these yourself:
INTERNETACCESS_NETWORK_STATE— powersuseNetwork()’s connectivity stateACCESS_WIFI_STATE— a “normal” permission (no runtime prompt); powersisWifiEnabledand is a prerequisite forssid/bssid
Permissions you need to add for optional features
A couple of fields are intentionally not turned on by default, because they’d force every consuming app into a permission or entitlement it might not want just for linking this package:
WiFi SSID / BSSID (useNetwork().ssid / .bssid) require:
- Android (API 27+): your app must declare and be granted
ACCESS_FINE_LOCATIONat runtime. - iOS: your app’s target needs the “Access WiFi Information” entitlement (Signing & Capabilities in Xcode), plus location authorization.
Without these, ssid/bssid simply resolve to "" — nothing crashes or
throws.
Permissions for kernel/permissions and kernel/media
Camera, location, notifications, and photo-library access are never
added to your manifest/Info.plist automatically — add only the entries for
the usePermission() types and useSmartScanner() modes you actually use.
iOS (Info.plist)
<key>NSCameraUsageDescription</key>
<string>Used to scan codes and documents.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Used to show content near you.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Used to access your photos.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Used to save photos.</string>Notifications need no Info.plist key — usePermission('notifications')
triggers the system prompt directly.
useSmartScanner() only ever needs CAMERA — document scanning doesn’t
need a separate storage permission, since Google’s and Apple’s scanner UIs
write pages to a location your app already has access to.
Next: kernel/system.