Summary: == Highlights == - Database query favourites are now persisted across sessions (b0caaa7) - Allow disabling iOS development in Settings (aab004a) - Various improvements to the sidebar - FPS graph to visualize slow UIs for plugin developers (31df1db) - Window theme attributes when clicking on a window in the inspector (c430fc3) - Removed Stetho dependency (48d6ea4). Thanks, ZacSweers! - Install plugins directly from package files (b9e7f5d6d1) == Fixes == - Mac plugins not showing up (02e0233) - Doctor: log both shown and suppressed warnings (35d62e70cb). Thanks, mateosilguero! - Fix default SDK path on Windows (e178221) - Doctor complains Android SDK is not installed (b625efe) - Update welcome screen links (33ad41c) - Fix 'Timed out waiting for device' error (060e8c0) Reviewed By: priteshrnandgaonkar Differential Revision: D19813089 fbshipit-source-id: 8b1fc6fb140d02b7f78adcadd7c45a3ed1755f2f
1.7 KiB
1.7 KiB
id, title, sidebar_label
| id | title | sidebar_label |
|---|---|---|
| network-plugin | Network Setup | Network |
To use the network plugin, you need to add the plugin to your Flipper client instance.
Android
The network plugin is shipped as a separate Maven artifact:
dependencies {
debugImplementation 'com.facebook.flipper:flipper-network-plugin:0.31.0'
}
Once added to your dependencies, you can instantiate the plugin and add it to the client:
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
client.addPlugin(networkFlipperPlugin);
OkHttp Integration
If you are using the popular OkHttp library, you can use the Interceptors system to automatically hook into your existing stack.
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
new OkHttpClient.Builder()
.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin))
.build();
As interceptors can modify the request and response, add the Flipper interceptor after all others to get an accurate view of the network traffic.
iOS
To enable network inspection, add the following pod to your Podfile:
pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version
Initialise the plugin in the following way:
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
[[FlipperClient sharedClient] addPlugin: [[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
import FlipperKit
client?.add(FlipperKitNetworkPlugin(networkAdapter: SKIOSNetworkAdapter()))