From 84ca4d5fe2af36520fb121768ab17223073ed72d Mon Sep 17 00:00:00 2001 From: Boris Tacyniak Date: Wed, 12 May 2021 08:06:47 +0200 Subject: [PATCH] remove Flipper from exemple project --- example/android/app/build.gradle | 12 --- .../android/app/src/debug/AndroidManifest.xml | 8 -- .../java/com/example/ReactNativeFlipper.java | 72 -------------- example/ios/Podfile | 10 -- example/ios/Podfile.lock | 98 +------------------ .../xcschemes/example-tvOS.xcscheme | 2 +- .../xcshareddata/xcschemes/example.xcscheme | 2 +- example/ios/example/AppDelegate.m | 22 ----- 8 files changed, 4 insertions(+), 222 deletions(-) delete mode 100644 example/android/app/src/debug/AndroidManifest.xml delete mode 100644 example/android/app/src/debug/java/com/example/ReactNativeFlipper.java diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 3d2337f29..3ff475d22 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -194,18 +194,6 @@ dependencies { implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" - debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { - exclude group:'com.facebook.fbjni' - } - - debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { - exclude group:'com.facebook.flipper' - } - - debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { - exclude group:'com.facebook.flipper' - } - if (enableHermes) { def hermesPath = "../../node_modules/hermes-engine/android/"; debugImplementation files(hermesPath + "hermes-debug.aar") diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index fa26aa56e..000000000 --- a/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - diff --git a/example/android/app/src/debug/java/com/example/ReactNativeFlipper.java b/example/android/app/src/debug/java/com/example/ReactNativeFlipper.java deleted file mode 100644 index a1b70b8aa..000000000 --- a/example/android/app/src/debug/java/com/example/ReactNativeFlipper.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - *

This source code is licensed under the MIT license found in the LICENSE file in the root - * directory of this source tree. - */ -package com.example; - -import android.content.Context; -import com.facebook.flipper.android.AndroidFlipperClient; -import com.facebook.flipper.android.utils.FlipperUtils; -import com.facebook.flipper.core.FlipperClient; -import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; -import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; -import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; -import com.facebook.flipper.plugins.inspector.DescriptorMapping; -import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; -import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; -import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; -import com.facebook.flipper.plugins.react.ReactFlipperPlugin; -import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; -import com.facebook.react.ReactInstanceManager; -import com.facebook.react.bridge.ReactContext; -import com.facebook.react.modules.network.NetworkingModule; -import okhttp3.OkHttpClient; - -public class ReactNativeFlipper { - public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { - if (FlipperUtils.shouldEnableFlipper(context)) { - final FlipperClient client = AndroidFlipperClient.getInstance(context); - - client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); - client.addPlugin(new ReactFlipperPlugin()); - client.addPlugin(new DatabasesFlipperPlugin(context)); - client.addPlugin(new SharedPreferencesFlipperPlugin(context)); - client.addPlugin(CrashReporterPlugin.getInstance()); - - NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); - NetworkingModule.setCustomClientBuilder( - new NetworkingModule.CustomClientBuilder() { - @Override - public void apply(OkHttpClient.Builder builder) { - builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); - } - }); - client.addPlugin(networkFlipperPlugin); - client.start(); - - // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized - // Hence we run if after all native modules have been initialized - ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); - if (reactContext == null) { - reactInstanceManager.addReactInstanceEventListener( - new ReactInstanceManager.ReactInstanceEventListener() { - @Override - public void onReactContextInitialized(ReactContext reactContext) { - reactInstanceManager.removeReactInstanceEventListener(this); - reactContext.runOnNativeModulesQueueThread( - new Runnable() { - @Override - public void run() { - client.addPlugin(new FrescoFlipperPlugin()); - } - }); - } - }); - } else { - client.addPlugin(new FrescoFlipperPlugin()); - } - } - } -} diff --git a/example/ios/Podfile b/example/ios/Podfile index 00f500b39..72234cc84 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -12,16 +12,6 @@ target 'example' do inherit! :complete # Pods for testing end - - - # Enables Flipper. - # - # Note that if you have use_frameworks! enabled, Flipper will not work and - # you should disable these next few lines. - use_flipper! - post_install do |installer| - flipper_post_install(installer) - end end target 'example-tvOS' do diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index dfed099b2..06c11226a 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,7 +1,5 @@ PODS: - boost-for-react-native (1.63.0) - - CocoaAsyncSocket (7.6.4) - - CocoaLibEvent (1.0.0) - DoubleConversion (1.1.6) - FBLazyVector (0.63.3) - FBReactNativeSpec (0.63.3): @@ -11,52 +9,6 @@ PODS: - React-Core (= 0.63.3) - React-jsi (= 0.63.3) - ReactCommon/turbomodule/core (= 0.63.3) - - Flipper (0.54.0): - - Flipper-Folly (~> 2.2) - - Flipper-RSocket (~> 1.1) - - Flipper-DoubleConversion (1.1.7) - - Flipper-Folly (2.3.0): - - boost-for-react-native - - CocoaLibEvent (~> 1.0) - - Flipper-DoubleConversion - - Flipper-Glog - - OpenSSL-Universal (= 1.0.2.20) - - Flipper-Glog (0.3.6) - - Flipper-PeerTalk (0.0.4) - - Flipper-RSocket (1.1.0): - - Flipper-Folly (~> 2.2) - - FlipperKit (0.54.0): - - FlipperKit/Core (= 0.54.0) - - FlipperKit/Core (0.54.0): - - Flipper (~> 0.54.0) - - FlipperKit/CppBridge - - FlipperKit/FBCxxFollyDynamicConvert - - FlipperKit/FBDefines - - FlipperKit/FKPortForwarding - - FlipperKit/CppBridge (0.54.0): - - Flipper (~> 0.54.0) - - FlipperKit/FBCxxFollyDynamicConvert (0.54.0): - - Flipper-Folly (~> 2.2) - - FlipperKit/FBDefines (0.54.0) - - FlipperKit/FKPortForwarding (0.54.0): - - CocoaAsyncSocket (~> 7.6) - - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.54.0) - - FlipperKit/FlipperKitLayoutPlugin (0.54.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutTextSearchable - - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutTextSearchable (0.54.0) - - FlipperKit/FlipperKitNetworkPlugin (0.54.0): - - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.54.0): - - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.54.0): - - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.54.0): - - FlipperKit/Core - - FlipperKit/FlipperKitNetworkPlugin - Folly (2020.01.13.00): - boost-for-react-native - DoubleConversion @@ -67,9 +19,6 @@ PODS: - DoubleConversion - glog - glog (0.3.5) - - OpenSSL-Universal (1.0.2.20): - - OpenSSL-Universal/Static (= 1.0.2.20) - - OpenSSL-Universal/Static (1.0.2.20) - RCTRequired (0.63.3) - RCTTypeSafety (0.63.3): - FBLazyVector (= 0.63.3) @@ -299,32 +248,11 @@ PODS: - RNCPushNotificationIOS (1.8.0): - React-Core - Yoga (1.14.0) - - YogaKit (1.18.1): - - Yoga (~> 1.14) DEPENDENCIES: - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) - - Flipper (~> 0.54.0) - - Flipper-DoubleConversion (= 1.1.7) - - Flipper-Folly (~> 2.2) - - Flipper-Glog (= 0.3.6) - - Flipper-PeerTalk (~> 0.0.4) - - Flipper-RSocket (~> 1.1) - - FlipperKit (~> 0.54.0) - - FlipperKit/Core (~> 0.54.0) - - FlipperKit/CppBridge (~> 0.54.0) - - FlipperKit/FBCxxFollyDynamicConvert (~> 0.54.0) - - FlipperKit/FBDefines (~> 0.54.0) - - FlipperKit/FKPortForwarding (~> 0.54.0) - - FlipperKit/FlipperKitHighlightOverlay (~> 0.54.0) - - FlipperKit/FlipperKitLayoutPlugin (~> 0.54.0) - - FlipperKit/FlipperKitLayoutTextSearchable (~> 0.54.0) - - FlipperKit/FlipperKitNetworkPlugin (~> 0.54.0) - - FlipperKit/FlipperKitReactPlugin (~> 0.54.0) - - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.54.0) - - FlipperKit/SKIOSNetworkPlugin (~> 0.54.0) - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) @@ -355,17 +283,6 @@ DEPENDENCIES: SPEC REPOS: trunk: - boost-for-react-native - - CocoaAsyncSocket - - CocoaLibEvent - - Flipper - - Flipper-DoubleConversion - - Flipper-Folly - - Flipper-Glog - - Flipper-PeerTalk - - Flipper-RSocket - - FlipperKit - - OpenSSL-Universal - - YogaKit EXTERNAL SOURCES: DoubleConversion: @@ -425,21 +342,11 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c - CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845 - CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f DoubleConversion: cde416483dac037923206447da6e1454df403714 FBLazyVector: 878b59e31113e289e275165efbe4b54fa614d43d FBReactNativeSpec: 7da9338acfb98d4ef9e5536805a0704572d33c2f - Flipper: be611d4b742d8c87fbae2ca5f44603a02539e365 - Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 - Flipper-Folly: e4493b013c02d9347d5e0cb4d128680239f6c78a - Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 - Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7 - FlipperKit: ab353d41aea8aae2ea6daaf813e67496642f3d7d Folly: b73c3869541e86821df3c387eb0af5f65addfab4 glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 - OpenSSL-Universal: ff34003318d5e1163e9529b08470708e389ffcdd RCTRequired: 48884c74035a0b5b76dbb7a998bd93bcfc5f2047 RCTTypeSafety: edf4b618033c2f1c5b7bc3d90d8e085ed95ba2ab React: f36e90f3ceb976546e97df3403e37d226f79d0e3 @@ -462,8 +369,7 @@ SPEC CHECKSUMS: ReactCommon: 4167844018c9ed375cc01a843e9ee564399e53c3 RNCPushNotificationIOS: 61a7c72bd1ebad3568025957d001e0f0e7b32191 Yoga: 7d13633d129fd179e01b8953d38d47be90db185a - YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 2ce9d926fa5d7b425b9668ca074ec805d1ac1617 +PODFILE CHECKSUM: 9f7efe26f7ad5184f28ac62478069370942924e2 -COCOAPODS: 1.10.0 +COCOAPODS: 1.10.1 diff --git a/example/ios/example.xcodeproj/xcshareddata/xcschemes/example-tvOS.xcscheme b/example/ios/example.xcodeproj/xcshareddata/xcschemes/example-tvOS.xcscheme index 9570230db..8046697ed 100644 --- a/example/ios/example.xcodeproj/xcshareddata/xcschemes/example-tvOS.xcscheme +++ b/example/ios/example.xcodeproj/xcshareddata/xcschemes/example-tvOS.xcscheme @@ -1,6 +1,6 @@ #import -#if FB_SONARKIT_ENABLED -#import -#import -#import -#import -#import -#import - -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 - @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { -#if FB_SONARKIT_ENABLED - InitializeFlipper(application); -#endif RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge