Summary: **Highlights** - New settings panel for configuring Android SDK paths and iOS support. - Support for taking screenshots and recording videos on Windows. - Copying an element name in the layout inspector now copies the attributes instead of just a numeric identifier. Full changelog at https://github.com/facebook/flipper/compare/v0.25.0...v0.26.0 Reviewed By: jknoxville Differential Revision: D18007369 fbshipit-source-id: ad4069da59f5b2b96090a14c17d57d37a0ca64be
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.26.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()))