-
Notifications
You must be signed in to change notification settings - Fork 22
Fix issues related to running the RN example app on iOS #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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! | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Flipper causes a lot of issues, so I decided to de-integrate it to get the example app running. |
||
| post_install do |installer| | ||
| flipper_post_install(installer) | ||
| end | ||
| end | ||
|
|
||
| target 'FastLink-tvOS' do | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,13 @@ | |
| "name": "FastLink", | ||
| "version": "0.0.1", | ||
| "private": true, | ||
| "engines": { | ||
| "node": "16.x" | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }, | ||
| "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", | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| "patch-package": "^8.0.0", | ||
| "postinstall-postinstall": "^2.1.0", | ||
| "react-test-renderer": "16.11.0" | ||
| }, | ||
| "jest": { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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<RCTModuleData *> *)_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules | ||
| +- (NSArray<RCTModuleData *> *)_initializeModules:(NSArray<Class> *)modules | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| 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))); | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
| } | ||
|
|
||
| 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() || | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| currentRelativeChild->getLayout().hadOverflow()); | ||
| } | ||
| return deltaFreeSpace; | ||





There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the Flipper integration code could be substituted by the usage of the
use_flipperscript, but this requires upgradingreact-native(https://fbflipper.com/docs/getting-started/react-native-ios/#react-native-063).