Skip to content

Commit

Permalink
Remove Flipper from RNTester
Browse files Browse the repository at this point in the history
Summary: Removed Flipper deps from RNTester for now, since it's not compatible with FB CI yet.

Reviewed By: axe-fb

Differential Revision: D17465404

fbshipit-source-id: 581f113506dc9dbd345c404a802eb1b622f68ab7
  • Loading branch information
fkgozali authored and facebook-github-bot committed Sep 19, 2019
1 parent 523ab83 commit ae5afaa
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ RNTester/build
# CocoaPods
/template/ios/Pods/
/template/ios/Podfile.lock
/RNTester/Pods/
# (TODO: revisit) /RNTester/Pods/
/RNTester/Gemfile.lock

# react-native-codegen
Expand Down
51 changes: 0 additions & 51 deletions RNTester/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,6 @@ if ENV['USE_FRAMEWORKS'] == '1'
use_frameworks!
end

# Add Flipper Poods
def flipper_pods()
flipperkit_version = '0.23.4'
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
def flipper_post_install(installer)
installer.pods_project.targets.each do |target|
if target.name == 'YogaKit'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.1'
end
end
end
file_name = Dir.glob("*.xcodeproj")[0]
app_project = Xcodeproj::Project.open(file_name)
app_project.native_targets.each do |target|
target.build_configurations.each do |config|
cflags = config.build_settings['OTHER_CFLAGS'] || '$(inherited) '
unless cflags.include? '-DFB_SONARKIT_ENABLED=1'
puts 'Adding -DFB_SONARKIT_ENABLED=1 in OTHER_CFLAGS...'
cflags << ' -DFB_SONARKIT_ENABLED=1'
end
config.build_settings['OTHER_CFLAGS'] = cflags
end
app_project.save
end
installer.pods_project.save
end

def pods()
project 'RNTesterPods.xcodeproj'

Expand All @@ -61,21 +26,6 @@ end

target 'RNTester' do
pods()
flipper_pods()

if ENV['USE_FRAMEWORKS'] == '1'
$static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly']
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
if $static_framework.include?(pod.name)
def pod.build_type;
Pod::Target::BuildType.static_library
end
end
end
end
end
end

target 'RNTesterUnitTests' do
Expand All @@ -89,7 +39,6 @@ target 'RNTesterIntegrationTests' do
end

post_install do |installer|
flipper_post_install(installer)
installer.pods_project.targets.each do |target|
puts target.name
end
Expand Down
2 changes: 1 addition & 1 deletion RNTester/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ SPEC CHECKSUMS:
React-RCTText: 9078167d3bc011162326f2d8ef4dd580ec1eca17
React-RCTVibration: 63c20d89204937ff8c7bbc1e712383347e6fbd90
ReactCommon: 63d1a6355d5810a21a61efda9ac93804571a1b8b
Yoga: 0abc4039ca4c0de783ab88c0ee21273583cbc2af
Yoga: d88d8b51ee5b247f43211e2edf272438df1b484f

PODFILE CHECKSUM: 060903e270072f1e192b064848e6c34528af1c87

Expand Down
28 changes: 0 additions & 28 deletions RNTester/RNTester/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@

#import <ReactCommon/RCTTurboModuleManager.h>

#if DEBUG
#ifdef FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#endif
#endif

#import "RNTesterTurboModuleProvider.h"

@interface AppDelegate() <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate>{
Expand All @@ -56,7 +45,6 @@ @implementation AppDelegate

- (BOOL)application:(__unused UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[AppDelegate initializeFlipper:application];
RCTEnableTurboModule(YES);

_bridge = [[RCTBridge alloc] initWithDelegate:self
Expand Down Expand Up @@ -193,22 +181,6 @@ - (void)application:(__unused UIApplication *)application didReceiveLocalNotific
[RCTPushNotificationManager didReceiveLocalNotification:notification];
}


+ (void) initializeFlipper:(UIApplication *)application
{
#if DEBUG
#ifdef FB_SONARKIT_ENABLED
FlipperClient *client = [FlipperClient sharedClient];
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
[client addPlugin: [[FlipperKitLayoutPlugin alloc] initWithRootNode: application withDescriptorMapper: layoutDescriptorMapper]];
[client addPlugin: [[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
[client addPlugin: [FlipperKitReactPlugin new]];
[client addPlugin: [[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
[client start];
#endif
#endif
}

#endif

@end

0 comments on commit ae5afaa

Please sign in to comment.