@veellv/browser-react-native
v1.0.0-rc.3
Published
Professional React Native SDK for Veellv In-App Browser.
Readme
@veellv/browser-react-native
Official React Native Veellv In-App Browser SDK.
The SDK provides a managed embedded browser host through react-native-webview, system browser/authentication surfaces through react-native-inappbrowser-reborn, a Veellv controller/session API, capability negotiation and the common v3 security contract.
Install
pnpm add @veellv/browser-react-native react-native-webview react-native-inappbrowser-rebornInstall iOS pods after adding native dependencies.
App root
Mount the embedded browser host once:
import { VeellvEmbeddedBrowserHost } from "@veellv/browser-react-native";
export function App() {
return (
<VeellvEmbeddedBrowserHost>
<RootNavigator />
</VeellvEmbeddedBrowserHost>
);
}Use the browser from a descendant component:
import { useVeellvBrowser } from "@veellv/browser-react-native";
const browser = useVeellvBrowser({
defaultAllowedDomains: ["veellv.com"],
});
await browser.open({
url: "https://veellv.com",
mode: "embedded",
});createVeellvBrowser() is also available for system-browser-only consumers and testing. Platform differences are available through browser.client.capabilities().
See examples/react-native/browser-lab for the reference host.
