Skip to content

Commit

Permalink
Remove Flipper from codebase (#41002)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #41002

Following up the deprecation of Flipper in 0.73 and preparing for the removal of Flipper in 0.74, we are removing Flipper integration from the Codebase.

## Changelog:
[iOS][Breaking] - Remove the Flipper integration

Reviewed By: dmytrorykun

Differential Revision: D50321255

fbshipit-source-id: d2f4488ada7acdbd3687f54db4204ba7f09370af
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Oct 17, 2023
1 parent 5678422 commit 899e7cd
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 506 deletions.
25 changes: 0 additions & 25 deletions packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,8 @@
#import <React/RCTSurfaceHostingProxyRootView.h>
#endif

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

static 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 addPlugin:[FlipperKitReactPlugin new]];
[client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
[client start];
}
#endif

void RCTAppSetupPrepareApp(UIApplication *application, BOOL turboModuleEnabled)
{
#ifdef FB_SONARKIT_ENABLED
InitializeFlipper(application);
#endif

#if RCT_NEW_ARCH_ENABLED
RCTEnableTurboModule(turboModuleEnabled);
#endif
Expand Down
149 changes: 0 additions & 149 deletions packages/react-native/scripts/cocoapods/__tests__/flipper-test.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

require "test/unit"
require_relative "../utils.rb"
require_relative "../flipper.rb"
require_relative "./test_utils/PodMock.rb"
require_relative "./test_utils/InstallerMock.rb"
require_relative "./test_utils/EnvironmentMock.rb"
Expand Down Expand Up @@ -101,7 +100,6 @@ def test_getDefaultFlag_whenOldArchitecture()
assert_equal(flags, {
:fabric_enabled => false,
:hermes_enabled => true,
:flipper_configuration => FlipperConfiguration.disabled
})
end

Expand All @@ -117,7 +115,6 @@ def test_getDefaultFlag_whenOldArchitectureButHermesDisabled()
assert_equal(flags, {
:fabric_enabled => false,
:hermes_enabled => false,
:flipper_configuration => FlipperConfiguration.disabled
})
end

Expand All @@ -132,7 +129,6 @@ def test_getDefaultFlag_whenNewArchitecture()
assert_equal(flags, {
:fabric_enabled => true,
:hermes_enabled => true,
:flipper_configuration => FlipperConfiguration.disabled
})
end

Expand All @@ -148,7 +144,6 @@ def test_getDefaultFlag_whenNewArchitectureButHermesDisabled()
assert_equal(flags, {
:fabric_enabled => true,
:hermes_enabled => false,
:flipper_configuration => FlipperConfiguration.disabled
})
end

Expand Down
107 changes: 0 additions & 107 deletions packages/react-native/scripts/cocoapods/flipper.rb

This file was deleted.

9 changes: 0 additions & 9 deletions packages/react-native/scripts/cocoapods/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def self.get_default_flags
flags = {
:fabric_enabled => false,
:hermes_enabled => true,
:flipper_configuration => FlipperConfiguration.disabled
}

if ENV['RCT_NEW_ARCH_ENABLED'] == '1'
Expand Down Expand Up @@ -269,14 +268,6 @@ def self.updateOSDeploymentTarget(installer)
pod_to_update = Set.new([
"boost",
"CocoaAsyncSocket",
"Flipper",
"Flipper-DoubleConversion",
"Flipper-Fmt",
"Flipper-Boost-iOSX",
"Flipper-Folly",
"Flipper-Glog",
"Flipper-PeerTalk",
"FlipperKit",
"fmt",
"libevent",
"OpenSSL-Universal",
Expand Down
Loading

0 comments on commit 899e7cd

Please sign in to comment.