Skip to content

Commit

Permalink
Merge pull request berty#4576 from clegirar/chore/app-profiling-tool
Browse files Browse the repository at this point in the history
chore: support react-devtools on flipper
  • Loading branch information
clegirar committed Apr 28, 2023
2 parents b7f2864 + 0469a2f commit cf13a3c
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 69 deletions.
14 changes: 14 additions & 0 deletions js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,17 @@ $ make storybook
2. Open the emulator an the App within it. Press 'R'.
3. Run the Storybook command `$ make storybook`.
4. And then reload the app within the emulator pressing the key 'R'. It will force the app load the new bundle.

## Flipper

Flipper is a tool for debugging iOS, Android and React Native apps.
We use it for profiling the app and to recuperate some logs that we don't have in metro.

To allow all features, you have to install flipper `0.162.0` version.
⚠️ When you upgrade react-native you have to find the correct version to run with.

To run it you just have to run the flipper desktop app and select the device application you want.
A known issue is that we are unable to connect our android device. Just verify in the settings of flipper your `platform-tools` path is good (`https://stackoverflow.com/a/72608113/10961298`).

This is a short video on what it can be expected for the profiler feature (`https://www.loom.com/share/0b0353df7e6445ecbbfd6e2e8cca784d`).
In this video we profile the debug app, but we really advise you to profile the release app.
7 changes: 4 additions & 3 deletions js/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@ use_react_native!(
# Note that if you have use_frameworks! enabled, Flipper will not work and
# FIX see: https://github.com/facebook/flipper/issues/2215#issuecomment-829102757
use_flipper!({
'Flipper-Folly' => '2.5.3',
'Flipper' => '0.87.0',
'Flipper-RSocket' => '1.3.1',
'Flipper-Folly' => '~> 2.6',
'Flipper' => '0.162.0',
'Flipper-RSocket' => '~> 1.4',
# use a custom glog.podspec to support apple m1
'Flipper-Glog' => { :podspec => "./glog/glog.podspec"},
})

post_install do |installer|
react_native_post_install(installer)
flipper_post_install(installer)

# enable only active arch for all pods
installer.pods_project.build_configurations.each do |config|
Expand Down
116 changes: 60 additions & 56 deletions js/ios/Podfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion js/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 4 additions & 9 deletions js/yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cf13a3c

Please sign in to comment.