@plyven/react-native
v0.1.1
Published
React Native bridge for Plyven using native Android/iOS SDKs
Maintainers
Readme
@plyven/react-native
React Native bridge that configures the existing Plyven native SDKs:
| Platform | Native SDK | How RN wires it |
|----------|------------|-----------------|
| Android | com.plyven:api-inspector-sdk (OkHttp) | RN OkHttpClientProvider factory + optional applyTo(builder) |
| iOS | ios/ SwiftPM Plyven (URLProtocol) | Plyven.install(DebugConfig…) via native module |
- Debug /
__DEV__only - No cloud / telemetry
Full guide: React Native install
SDK distribution status: SDK release notes
Install (0.1.0)
Not published to the npm registry yet. Until a release explicitly publishes @plyven/react-native, install from this repository (path or staged tarball). The plyven-rn.podspec is for local / autolink installs only — not CocoaPods trunk.
Local / path (supported today)
npm install ../path/to/Plyven/packages/react-nativeStaged tarball (supported today)
After scripts/stage-sdk-release.ps1 in the Plyven repo:
npm install ../path/to/Plyven/dist/sdk/plyven-react-native-0.1.0.tgzPublic npm (future only)
When this package is actually published:
npm install @plyven/react-nativeDo not use the registry command above until publish succeeds (npm view @plyven/react-native must resolve).
Why this package ships TypeScript source
This package intentionally distributes TypeScript source (main / react-native → src/index.ts) plus native Android/iOS bridge files. React Native’s Metro bundler compiles that source in the app. There is no separate JS dist/ build step for the JS bridge — that is intentional, not an incomplete publish layout.
Consumers need:
- A normal React Native app (Metro / autolinking)
- Android: Maven Local (or a future public Maven artifact) for
com.plyven:api-inspector-sdk - iOS: local SwiftPM package from the Plyven repo’s
ios/directory (not a GitHub SPM URL for this monorepo yet)
JS
import { Plyven } from "@plyven/react-native";
if (__DEV__) {
Plyven.install({
host: process.env.PLYVEN_HOST ?? "192.168.1.10", // device → PC LAN IP
port: 8081,
});
}Android
- Publish the Android SDK to Maven Local from the Plyven repo:
cd android && ./gradlew :inspector-okhttp:publishToMavenLocal - Ensure
mavenLocal()is in repositories and depend oncom.plyven:api-inspector-sdk:0.1.0(debug). - Autolink registers
PlyvenPackage(or addpackages.add(new com.plyven.rn.PlyvenPackage());). - Call
Plyven.install({ host, port })from JS in__DEV__.
Custom OkHttp clients can call PlyvenNative.applyTo(builder) from Kotlin.
iOS
- Add the Plyven Swift package (
ios/in the Plyven repo) to the Xcode workspace / app target (DEBUG). - Autolink /
pod installforplyven-rn. - Call
Plyven.install({ host, port })from JS in__DEV__.
License
Proprietary — Plyven Commercial Software and SDK License. license in package.json is UNLICENSED. Not open source.
