Introduction
Debugging network traffic is often the toughest part of mobile app development. Whether you’re troubleshooting an API integration, diagnosing performance bottlenecks, or ensuring secure data transfers, real‑time visibility into HTTP(S) requests and responses is essential. Flipper, Facebook’s open‑source debugging platform for iOS and Android, offers a robust Network Inspector plugin that integrates seamlessly with React Native, native iOS (Swift/Objective‑C), and Android (Java/Kotlin) apps. This comprehensive guide will walk you through every aspect:
- Installing and configuring Flipper in different environments
- Capturing, filtering, and analyzing network requests
- Simulating network conditions for performance testing
- Inspecting security details (SSL/TLS, certificates)
- Mocking and rewriting responses for edge‑case testing
- Integrating network logs into automated test pipelines
- Extending Flipper with custom plugins
- Troubleshooting common pitfalls

By the end, you’ll master Flipper’s Network plugin—enabling you to pinpoint issues, optimize payloads, and ship more reliable mobile applications.
1. Installing and Configuring Flipper
1.1 Flipper Desktop App
- Download: Visit fbflipper.com and select your OS (macOS, Windows, or Linux).
- Install:
- macOS: Drag the Flipper.app to your Applications folder.
- Windows: Run the MSI and follow prompts.
- Linux: Extract the AppImage and make it executable (
chmod +x).
- Launch: Open Flipper and you should see your connected device or emulator listed under “Devices.”
1.2 React Native Integration
Step A: Install Dependencies
bashCopyEditnpm install --save-dev react-native-flipper
Step B: iOS Setup
In your ios/Podfile, add:
rubyCopyEdituse_flipper!()
post_install do |installer|
flipper_post_install(installer)
end
Then in the terminal:
bashCopyEditcd ios && pod install
Step C: Android Setup
In android/app/build.gradle, under dependencies:
groovyCopyEditdebugImplementation 'com.facebook.flipper:flipper:0.187.0'
debugImplementation 'com.facebook.flipper:flipper-network-plugin:0.187.0'
releaseImplementation 'com.facebook.flipper:flipper-noop:0.187.0'
In your MainApplication.java (or Kotlin equivalent), register the plugin:
javaCopyEditimport com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
public class MainApplication extends Application implements ReactApplication {
private final NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, false);
FlipperClient client = AndroidFlipperClient.getInstance(this);
client.addPlugin(networkFlipperPlugin);
client.start();
}
private OkHttpClient getOkHttpClient() {
return new OkHttpClient.Builder()
.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin))
.build();
}
}
1.3 Native iOS (Swift) Integration
Step A: CocoaPods
In your Podfile:
rubyCopyEditpod 'FlipperKit/FlipperKitNetworkPlugin'
pod 'FlipperKit/FlipperKitLayoutPlugin' # optional
Then:
bashCopyEditpod install
Step B: AppDelegate Configuration
swiftCopyEditimport FlipperKit
func initializeFlipper(_ application: UIApplication) {
let client = FlipperClient.shared()
let networkPlugin = SKIOSNetworkAdapter() // FlipperKitNetworkPlugin adapter
client?.add(networkPlugin)
client?.start()
}
// In didFinishLaunching:
#if DEBUG
initializeFlipper(application)
#endif
1.4 Native Android (Kotlin) Integration
Step A: Gradle
In app/build.gradle:
groovyCopyEditdebugImplementation 'com.facebook.flipper:flipper-network-plugin:0.187.0'
releaseImplementation 'com.facebook.flipper:flipper-noop:0.187.0'
Step B: Application Class
kotlinCopyEditclass MyApp : Application() {
override fun onCreate() {
super.onCreate()
if (BuildConfig.DEBUG) {
val client = AndroidFlipperClient.getInstance(this)
val networkPlugin = NetworkFlipperPlugin()
client.addPlugin(networkPlugin)
client.start()
// Initialize OkHttp with interceptor
val httpClient = OkHttpClient.Builder()
.addNetworkInterceptor(FlipperOkhttpInterceptor(networkPlugin))
.build()
}
}
}
2. Capturing and Analyzing Network Requests
2.1 Viewing Requests
- Open Network Plugin: In Flipper’s left sidebar under your app, click Network.
- Live Stream: Every request/response appears in real time, showing Method, Path, Status, Duration, and Size.

2.2 Request List Columns
- Method: HTTP verb (GET, POST, PUT, DELETE).
- Path: Endpoint URI.
- Status: Response code (200, 404, 500).
- Time: Total round‑trip time in milliseconds.
- Size: Total payload size.
2.3 Detailed Inspection
Click any entry to display tabs:
- General: URL, timestamps, duration.
- Headers: Full request and response headers—useful for auth tokens, content types, cache directives.
- Query: Parsed URL parameters for GET requests.
- Request Body: JSON or form data with syntax highlighting.
- Response Body: Parsed JSON, XML, or raw bytes (images, files).
- Performance: DNS lookup, TCP connect, TLS handshake, TTFB, and data transfer timings.
2.4 Filtering and Searching
- Search Bar: Filter by method, path substring, or status code.
- Column Sorting: Click column headers to sort ascending/descending.
- Custom Filters: In the Network plugin settings, define regex-based filters to show only relevant endpoints.
3. Simulating Network Conditions
3.1 Throttling
- Enable Throttling: Open Settings (gear icon) in the Network plugin.
- Select Profile: Choose presets—Offline, Slow 2G, Fast 3G—or define custom bandwidth, latency, and packet loss.
- Test App Behavior: Verify loading indicators, retry logic, and error handling under constrained conditions.
3.2 Timeout and Retry Testing
- Simulate Timeouts: Set extremely high latency or 100% packet loss to trigger your app’s timeout code paths.
- Observe Retries: Watch repeated attempts in Flipper, ensuring backoff algorithms and user notifications function correctly.
4. Inspecting Security Details
4.1 SSL/TLS Certificate Chain
- Certificate Tab: In each request’s detail view, see the SSL certificate chain—issuer, validity period, and public key fingerprint.
- Debug Pinning Issues: Confirm if connections use the expected certificates or if pinning failures occur.
4.2 Certificate Validation Errors
- View Errors: Flipper shows certificate validation errors (expired, self-signed) that your app might suppress.
- Remediation: Update CA bundles or adjust pinning configurations based on the insights.
5. Mocking and Rewriting Responses
5.1 Basic Mocking
In development builds, wrap your fetch or OkHttp calls with a conditional override:
jsCopyEditif (__DEV__ && url.includes('/api/data')) {
return Promise.resolve({ json: async () => ({ mock: true }) });
}
5.2 Advanced Plugin-Based Mocking
- Create a Custom Flipper Plugin that intercepts network calls at runtime and serves mocked JSON—ideal for QA testing edge cases without code changes.

5.3 Response Rewriting
- On-the-Fly Edits: In Flipper’s Network plugin, click “Edit” on a response and modify JSON fields. Some custom builds can replay the altered response back into the app.
6. Integrating with Automated Tests
6.1 Recording Network Logs in CI
- Headless Mode: Use Flipper’s CLI to record sessions during end-to-end tests (e.g., Detox, Espresso).
- Artifact Storage: Save JSON exports of network logs alongside test reports for post-failure diagnostics.
6.2 API Contract Validation
- Schema Assertions: Incorporate JSON schema validation in your test suite; compare live responses (captured via Flipper) against expected schemas.
- Regression Alerts: Fail builds if key endpoints change shape or status codes deviate.
7. Extending Flipper with Custom Plugins
7.1 Plugin Boilerplate
- Initialize with the Flipper plugin template: bashCopyEdit
npx @react-native-community/cli-plugin flipper init-my-plugin - Implement Data Handlers: Subscribe to native network events or JavaScript lifecycle hooks.
- Build UI Panels: Use React components to display custom charts, warnings, or aggregated metrics.
7.2 Sharing and Reuse
- Publish to NPM or internal registries.
- Document installation steps and example use cases in your engineering wiki.
8. Troubleshooting Common Pitfalls
| Issue | Solution |
|---|---|
| No Requests Showing in Flipper | Ensure your app is compiled in Debug mode and the plugin is initialized before network calls. |
| SSL Interception Fails | Confirm your certificate pinning allows debug certificates or disable pinning in development. |
| Duplicate Entries | Remove multiple interceptors—only one Flipper network interceptor per client instance. |
| High Memory Usage | Limit captured payload sizes in settings; clear old entries regularly. |
| App Crashes on Startup | Check version mismatches of Flipper dependencies between desktop and mobile modules. |
Conclusion
Flipper’s Network Inspector revolutionizes mobile development by providing real-time, cross-platform visibility into every API call—down to headers, bodies, and performance breakdowns. With thorough setup instructions for React Native, iOS, and Android; advanced techniques for throttling, SSL inspection, and mocking; and strategies for integrating with CI pipelines, you’re now equipped to:
- Diagnose elusive bugs faster
- Optimize payloads and reduce latency
- Validate security and certificate configurations
- Automate network log capture in tests
- Extend Flipper to meet your team’s unique needs
Start integrating Flipper into your workflow today, and transform network debugging from a headache into a streamlined, confidence‑boosting process.























































































































































































































































































































































































































































































































































































































































































