Skip to content

Commit 8c5c686

Browse files
committed
docs(native): add ios install
1 parent 82a0fea commit 8c5c686

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
[![Build Status](https://app.travis-ci.com/bamlab/react-native-performance.svg?branch=master)](https://app.travis-ci.com/bamlab/react-native-performance)
44

5-
Only Android is supported for now. Add a 👍 on [this issue](https://github.com/bamlab/react-native-performance/issues/18) if you want to see iOS support.
6-
75
![rn-perf-monitor](https://user-images.githubusercontent.com/4534323/151138734-dc9af3b1-1e96-4416-8abd-346597a4dbe8.gif)
86

97
## Usage
@@ -41,6 +39,27 @@ Then go to iOS/Android section below to continue the install
4139

4240
#### iOS
4341

42+
- Run `cd ios && pod install`
43+
44+
- In `./ios/yourapp/AppDelegate.m` (where `yourapp` depends on your app), add 2 lines:
45+
46+
```objc
47+
#ifdef FB_SONARKIT_ENABLED
48+
...
49+
// Add this line
50+
#import <FlipperPerformancePlugin.h>
51+
52+
static void InitializeFlipper(UIApplication *application) {
53+
...
54+
55+
// Add this line
56+
[client addPlugin:[FlipperPerformancePlugin new]];
57+
58+
[client start];
59+
}
60+
#endif
61+
```
62+
4463
#### Android
4564

4665
In `./android/app/src/debug/java/com/yourapp/ReactNativeFlipper.java` (where `com/yourapp` depends on your app), add:

0 commit comments

Comments
 (0)