Skip to content

Commit

Permalink
Add React Dev tools to the default template
Browse files Browse the repository at this point in the history
Reviewed By: PeteTheHeat

Differential Revision: D17222891

fbshipit-source-id: ea3ce9b2285f67dc01cd11c66ce4a41a4c4ea958
  • Loading branch information
axe-fb authored and facebook-github-bot committed Sep 7, 2019
1 parent 6a9ea48 commit e8541e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion template/ios/HelloWorld/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
#endif

@implementation AppDelegate
Expand Down Expand Up @@ -53,7 +54,8 @@ + (void) initializeFlipper:(UIApplication *)application
FlipperClient *client = [FlipperClient sharedClient];
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
[client addPlugin: [[FlipperKitLayoutPlugin alloc] initWithRootNode: application withDescriptorMapper: layoutDescriptorMapper]];
[client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; [client start];
[client addPlugin: [[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
[client addPlugin: [FlipperKitReactPlugin new]];
[client addPlugin: [[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
[client start];
#endif
Expand Down
7 changes: 4 additions & 3 deletions template/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ

# Add Flipper Poods
def flipper_pods()
flipperkit_version = '0.23.4'
flipperkit_version = '0.23.6'
pod 'FlipperKit', '~>' + flipperkit_version, :configuration => 'Debug'
pod 'FlipperKit/FlipperKitLayoutPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
pod 'FlipperKit/FlipperKitReactPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
end

# Post Install processing for Flipper
Expand Down Expand Up @@ -77,8 +78,8 @@ target 'HelloWorld' do
use_native_modules!

# For enabling Flipper.
# Note that if you use_framework!, flipper will no work.
# Disable these lines if you are doing use_framework!
# Note that if you use_framework!, flipper will no work.
# Disable these lines if you are doing use_framework!
flipper_pods()
post_install do |installer|
flipper_post_install(installer)
Expand Down

1 comment on commit e8541e0

@janicduplessis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@axe-fb I tried this but the podspec for the react plugin doesn't exist in 0.23.6, will need a new flipper release.

Please sign in to comment.