@ryanneilstroud/periscope-react-native
v1.2.0
Published
React Native bridge package for PeriscopeKit and PeriscopeAndroid
Maintainers
Readme
@ryanneilstroud/periscope-react-native
React Native bridge for PeriscopeKit (iOS) and PeriscopeAndroid (Android) with low-friction installation.
Status
Implemented for iOS and Android via React Native native module autolinking.
1.2.0
This release uses PeriscopeKit 1.2.0 and PeriscopeAndroid 1.2.0. Native
WebSocket capture remains automatic on iOS. The React Native bridge continues to
capture HTTP on Android; its JavaScript API does not yet route React Native
WebSockets through PeriscopeAndroid's opt-in WebSocket factory.
Install
- Install from npm:
pnpm add @ryanneilstroud/[email protected]
# or: npm install @ryanneilstroud/[email protected]npx pod-install --repo-update(iOS)- Rebuild your app
Usage
import {Periscope} from '@ryanneilstroud/periscope-react-native';
await Periscope.capture({
receiver: {
host: 'localhost', // simulator only; use your Mac LAN IP on physical devices
port: 61337,
},
});Stop monitoring:
await Periscope.stop();You can also call named exports:
import {capture, stop} from '@ryanneilstroud/periscope-react-native';Platform support
- iOS: HTTP and native
URLSessionWebSocketTaskcapture - Android: HTTP capture through
PeriscopeAndroid 1.2.0; React Native WebSocket capture is not yet exposed
iOS WebSocket limitations
PeriscopeKit dynamically observes native URLSessionWebSocketTask send and receive
operations, so no WebSocket-specific React Native integration is required beyond
starting Periscope normally. Capture is best effort: it does not cover third-party
socket implementations, lower-level networking APIs, or traffic that occurred
before Periscope started. Keep Periscope disabled in release builds.
