From 20379cf7d13674e388d5cfe8c9b423e223405d44 Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Wed, 1 May 2019 09:42:19 -0700 Subject: [PATCH] Update network plugin docs for iOS Summary: Updated the installation instruction for the network plugin Reviewed By: jknoxville Differential Revision: D15166206 fbshipit-source-id: c30d18cd7ac62c813e368de914b279f466a1f1c1 --- docs/setup/network-plugin.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/setup/network-plugin.md b/docs/setup/network-plugin.md index 41e3322f5..3222f43b4 100644 --- a/docs/setup/network-plugin.md +++ b/docs/setup/network-plugin.md @@ -31,8 +31,27 @@ As interceptors can modify the request and response, add the Flipper interceptor ## iOS +To enable network inspection, add the following pod to your Podfile: + +```ruby +pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version +``` + +Initialise the plugin in the following way: + + + ```objective-c #import -[client addPlugin: [FlipperKitNetworkPlugin new]] +[[FlipperClient sharedClient] addPlugin: [[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; + ``` + +```swift +import FlipperKit + +client?.add(FlipperKitNetworkPlugin(networkAdapter: SKIOSNetworkAdapter())) + +``` +