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
This commit is contained in:
committed by
Facebook Github Bot
parent
cd9445a3bd
commit
20379cf7d1
@@ -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:
|
||||
|
||||
<!--DOCUSAURUS_CODE_TABS-->
|
||||
<!--Objective-C-->
|
||||
```objective-c
|
||||
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
|
||||
|
||||
[client addPlugin: [FlipperKitNetworkPlugin new]]
|
||||
[[FlipperClient sharedClient] addPlugin: [[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
|
||||
|
||||
```
|
||||
<!--Swift-->
|
||||
```swift
|
||||
import FlipperKit
|
||||
|
||||
client?.add(FlipperKitNetworkPlugin(networkAdapter: SKIOSNetworkAdapter()))
|
||||
|
||||
```
|
||||
<!--END_DOCUSAURUS_CODE_TABS-->
|
||||
|
||||
Reference in New Issue
Block a user