expo-network-logger
v1.0.1
Published
Native network logger for debugging
Downloads
144
Maintainers
Readme
expo-network-logger
a library for wrapping Pulse in React Native (Expo) and Chucker in React Native (Expo).
It's only for iOS at the moment.
| ConsoleView (SwiftUI) | PulseLoggerView (with react native view) | | -------------------------------------------------------------------- | --------------------------------------------------------------------- | | | |
Table of Contents
Installation
Installation in managed Expo projects
For managed Expo projects, please follow the installation instructions in the API documentation for the latest stable release. If you follow the link and there is no documentation available then this library is not yet usable within managed projects — it is likely to be included in an upcoming Expo SDK release.
Installation in bare React Native projects
For bare React Native projects, you must ensure that you have installed and configured the expo package before continuing.
Add the package to your npm dependencies
Using npm:
npm install expo-network-loggerUsing yarn:
yarn add expo-network-loggerUsing pnpm:
pnpm add expo-network-loggerUsing bun:
bun add expo-network-loggerConfiguration
Configure for iOS
You will need to make sure that your iOS deployment target is 14.0 or later.
Using expo plugin (Recommended):
npx expo install expo-build-propertiesin
app.json{ "plugins": [ [ "expo-build-properties", { "ios": { "deploymentTarget": "14.0" } } ] ] }Manually (Not Recommended):
Navigate to
ios/Podfileand replace this line withplatform :ios, '14.0'- platform :ios, podfile_properties['ios.deploymentTarget'] || '13.4' + platform :ios, '14.0'
Run npx pod-install after installing the npm package.
Usage
Enable logging
import { enableLogging } from "expo-network-logger";
enableLogging();Show Pulse Logger View (iOS only)
import { ExpoNetworkLoggerView } from "expo-network-logger";
<ExpoNetworkLoggerView style={{ flex: 1 }} />Show Chucker View (Android only)
import { launchScreen } from "expo-network-logger";
launchScreen();Contributing
Contributions are very welcome! Please refer to guidelines described in the contributing guide.
