diff --git a/v4/mobile/react-native/FastLink/ios/FastLink/AppDelegate.m b/v4/mobile/react-native/FastLink/ios/FastLink/AppDelegate.m index 26c3128..71efd71 100644 --- a/v4/mobile/react-native/FastLink/ios/FastLink/AppDelegate.m +++ b/v4/mobile/react-native/FastLink/ios/FastLink/AppDelegate.m @@ -4,33 +4,10 @@ #import #import -#if DEBUG -#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 DEBUG - InitializeFlipper(application); -#endif - RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"FastLink" diff --git a/v4/mobile/react-native/FastLink/ios/Podfile b/v4/mobile/react-native/FastLink/ios/Podfile index ddb7028..f356fff 100644 --- a/v4/mobile/react-native/FastLink/ios/Podfile +++ b/v4/mobile/react-native/FastLink/ios/Podfile @@ -1,49 +1,6 @@ platform :ios, '11.0' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' -def add_flipper_pods!(versions = {}) - versions['Flipper'] ||= '~> 0.33.1' - versions['DoubleConversion'] ||= '1.1.7' - versions['Flipper-Folly'] ||= '~> 2.1' - versions['Flipper-Glog'] ||= '0.3.6' - versions['Flipper-PeerTalk'] ||= '~> 0.0.4' - versions['Flipper-RSocket'] ||= '~> 1.0' - - pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug' - - # List all transitive dependencies for FlipperKit pods - # to avoid them being linked in Release builds - pod 'Flipper', versions['Flipper'], :configuration => 'Debug' - pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug' - pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug' - pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug' - pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug' - pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug' - pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :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 -end - target 'FastLink' do # Pods for FastLink pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" @@ -83,15 +40,6 @@ target 'FastLink' do end use_native_modules! - - # Enables Flipper. - # - # Note that if you have use_frameworks! enabled, Flipper will not work and - # you should disable these next few lines. - add_flipper_pods! - post_install do |installer| - flipper_post_install(installer) - end end target 'FastLink-tvOS' do diff --git a/v4/mobile/react-native/FastLink/ios/Podfile.lock b/v4/mobile/react-native/FastLink/ios/Podfile.lock index 6aad655..35d22e4 100644 --- a/v4/mobile/react-native/FastLink/ios/Podfile.lock +++ b/v4/mobile/react-native/FastLink/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.62.2) - FBReactNativeSpec (0.62.2): @@ -11,52 +9,6 @@ PODS: - React-Core (= 0.62.2) - React-jsi (= 0.62.2) - ReactCommon/turbomodule/core (= 0.62.2) - - Flipper (0.33.1): - - Flipper-Folly (~> 2.1) - - Flipper-RSocket (~> 1.0) - - Flipper-DoubleConversion (1.1.7) - - Flipper-Folly (2.2.0): - - boost-for-react-native - - CocoaLibEvent (~> 1.0) - - Flipper-DoubleConversion - - Flipper-Glog - - OpenSSL-Universal (= 1.0.2.19) - - Flipper-Glog (0.3.6) - - Flipper-PeerTalk (0.0.4) - - Flipper-RSocket (1.1.0): - - Flipper-Folly (~> 2.2) - - FlipperKit (0.33.1): - - FlipperKit/Core (= 0.33.1) - - FlipperKit/Core (0.33.1): - - Flipper (~> 0.33.1) - - FlipperKit/CppBridge - - FlipperKit/FBCxxFollyDynamicConvert - - FlipperKit/FBDefines - - FlipperKit/FKPortForwarding - - FlipperKit/CppBridge (0.33.1): - - Flipper (~> 0.33.1) - - FlipperKit/FBCxxFollyDynamicConvert (0.33.1): - - Flipper-Folly (~> 2.1) - - FlipperKit/FBDefines (0.33.1) - - FlipperKit/FKPortForwarding (0.33.1): - - CocoaAsyncSocket (~> 7.6) - - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.33.1) - - FlipperKit/FlipperKitLayoutPlugin (0.33.1): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutTextSearchable - - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutTextSearchable (0.33.1) - - FlipperKit/FlipperKitNetworkPlugin (0.33.1): - - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.33.1): - - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.33.1): - - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.33.1): - - FlipperKit/Core - - FlipperKit/FlipperKitNetworkPlugin - Folly (2018.10.22.00): - boost-for-react-native - DoubleConversion @@ -67,9 +19,6 @@ PODS: - DoubleConversion - glog - glog (0.3.5) - - OpenSSL-Universal (1.0.2.19): - - OpenSSL-Universal/Static (= 1.0.2.19) - - OpenSSL-Universal/Static (1.0.2.19) - RCTRequired (0.62.2) - RCTTypeSafety (0.62.2): - FBLazyVector (= 0.62.2) @@ -233,7 +182,7 @@ PODS: - React-cxxreact (= 0.62.2) - React-jsi (= 0.62.2) - React-jsinspector (0.62.2) - - react-native-safe-area-context (1.0.0): + - react-native-safe-area-context (1.0.2): - React - react-native-webview (9.2.2): - React @@ -296,41 +245,20 @@ PODS: - React-cxxreact (= 0.62.2) - React-jsi (= 0.62.2) - ReactCommon/callinvoker (= 0.62.2) - - RNCMaskedView (0.1.10): - - React - - RNGestureHandler (1.6.1): - - React - - RNReanimated (1.8.0): - - React - - RNScreens (2.7.0): + - RNCMaskedView (0.1.11): - React + - RNGestureHandler (1.10.3): + - React-Core + - RNReanimated (1.13.4): + - React-Core + - RNScreens (2.18.1): + - 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.33.1) - - Flipper-DoubleConversion (= 1.1.7) - - Flipper-Folly (~> 2.1) - - Flipper-Glog (= 0.3.6) - - Flipper-PeerTalk (~> 0.0.4) - - Flipper-RSocket (~> 1.0) - - FlipperKit (~> 0.33.1) - - FlipperKit/Core (~> 0.33.1) - - FlipperKit/CppBridge (~> 0.33.1) - - FlipperKit/FBCxxFollyDynamicConvert (~> 0.33.1) - - FlipperKit/FBDefines (~> 0.33.1) - - FlipperKit/FKPortForwarding (~> 0.33.1) - - FlipperKit/FlipperKitHighlightOverlay (~> 0.33.1) - - FlipperKit/FlipperKitLayoutPlugin (~> 0.33.1) - - FlipperKit/FlipperKitLayoutTextSearchable (~> 0.33.1) - - FlipperKit/FlipperKitNetworkPlugin (~> 0.33.1) - - FlipperKit/FlipperKitReactPlugin (~> 0.33.1) - - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.33.1) - - FlipperKit/SKIOSNetworkPlugin (~> 0.33.1) - 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`) @@ -366,17 +294,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: @@ -444,21 +361,11 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c - CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845 - CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 FBLazyVector: 4aab18c93cd9546e4bfed752b4084585eca8b245 FBReactNativeSpec: 5465d51ccfeecb7faa12f9ae0024f2044ce4044e - Flipper: 6c1f484f9a88d30ab3e272800d53688439e50f69 - Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 - Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3 - Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 - Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7 - FlipperKit: 6dc9b8f4ef60d9e5ded7f0264db299c91f18832e Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51 glog: 1f3da668190260b06b429bb211bfbee5cd790c28 - OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355 RCTRequired: cec6a34b3ac8a9915c37e7e4ad3aa74726ce4035 RCTTypeSafety: 93006131180074cffa227a1075802c89a49dd4ce React: 29a8b1a02bd764fb7644ef04019270849b9a7ac3 @@ -468,7 +375,7 @@ SPEC CHECKSUMS: React-jsi: b6dc94a6a12ff98e8877287a0b7620d365201161 React-jsiexecutor: 1540d1c01bb493ae3124ed83351b1b6a155db7da React-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493 - react-native-safe-area-context: a346c75f2288147527365ce27b59ca6d38c27805 + react-native-safe-area-context: 9d9640a9085014864052e38496fc1dfde0b93974 react-native-webview: 881baa70f381b838964574f48153a2d453402922 React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c React-RCTAnimation: 49ab98b1c1ff4445148b72a3d61554138565bad0 @@ -480,13 +387,12 @@ SPEC CHECKSUMS: React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256 ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3 - RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f - RNGestureHandler: 8f09cd560f8d533eb36da5a6c5a843af9f056b38 - RNReanimated: 955cf4068714003d2f1a6e2bae3fb1118f359aff - RNScreens: cf198f915f8a2bf163de94ca9f5bfc8d326c3706 + RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489 + RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211 + RNReanimated: c1b56d030d1616239861534d9adb531f8cffab68 + RNScreens: f7ad633b2e0190b77b6a7aab7f914fad6f198d8d Yoga: 3ebccbdd559724312790e7742142d062476b698e - YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 17effc5b5ef3824eb033bbb0b9019a98920ba3b5 +PODFILE CHECKSUM: 66554a13f8739faeaa26ab446354f9f67cda7a30 -COCOAPODS: 1.8.4 +COCOAPODS: 1.15.2 diff --git a/v4/mobile/react-native/FastLink/package.json b/v4/mobile/react-native/FastLink/package.json index 5d650b3..5173ad4 100644 --- a/v4/mobile/react-native/FastLink/package.json +++ b/v4/mobile/react-native/FastLink/package.json @@ -2,9 +2,13 @@ "name": "FastLink", "version": "0.0.1", "private": true, + "engines": { + "node": "16.x" + }, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", + "postinstall": "patch-package", "start": "react-native start", "test": "jest", "lint": "eslint ." @@ -28,7 +32,9 @@ "babel-jest": "^24.9.0", "eslint": "^6.5.1", "jest": "^24.9.0", - "metro-react-native-babel-preset": "^0.58.0", + "metro-react-native-babel-preset": "^0.59.0", + "patch-package": "^8.0.0", + "postinstall-postinstall": "^2.1.0", "react-test-renderer": "16.11.0" }, "jest": { diff --git a/v4/mobile/react-native/FastLink/patches/react-native+0.62.2.patch b/v4/mobile/react-native/FastLink/patches/react-native+0.62.2.patch new file mode 100644 index 0000000..48cb556 --- /dev/null +++ b/v4/mobile/react-native/FastLink/patches/react-native+0.62.2.patch @@ -0,0 +1,39 @@ +diff --git a/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm b/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm +index 18b0e09..6e676f9 100644 +--- a/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm ++++ b/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm +@@ -768,7 +768,7 @@ - (void)registerExtraLazyModules + #endif + } + +-- (NSArray *)_initializeModules:(NSArray> *)modules ++- (NSArray *)_initializeModules:(NSArray *)modules + withDispatchGroup:(dispatch_group_t)dispatchGroup + lazilyDiscovered:(BOOL)lazilyDiscovered + { +diff --git a/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm b/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm +index 841f925..338c9b5 100644 +--- a/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm ++++ b/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm +@@ -304,7 +304,7 @@ - (void)notifyAboutTurboModuleSetup:(const char *)name + @"%@ has no setter or ivar for its bridge, which is not " + "permitted. You must either @synthesize the bridge property, " + "or provide your own setter method.", +- RCTBridgeModuleNameForClass(strongModule)); ++ RCTBridgeModuleNameForClass(Class(strongModule))); + } + } + +diff --git a/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp b/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp +index 41de511..bded946 100644 +--- a/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp ++++ b/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp +@@ -2274,7 +2274,7 @@ static float YGDistributeFreeSpaceSecondPass( + depth, + generationCount); + node->setLayoutHadOverflow( +- node->getLayout().hadOverflow() | ++ node->getLayout().hadOverflow() || + currentRelativeChild->getLayout().hadOverflow()); + } + return deltaFreeSpace;