-
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?
Conversation
| # | ||
| # Note that if you have use_frameworks! enabled, Flipper will not work and | ||
| # you should disable these next few lines. | ||
| add_flipper_pods! |
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.
Flipper causes a lot of issues, so I decided to de-integrate it to get the example app running.
| "version": "0.0.1", | ||
| "private": true, | ||
| "engines": { | ||
| "node": "16.x" |
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.
| "eslint": "^6.5.1", | ||
| "jest": "^24.9.0", | ||
| "metro-react-native-babel-preset": "^0.58.0", | ||
| "metro-react-native-babel-preset": "^0.59.0", |
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.
| generationCount); | ||
| node->setLayoutHadOverflow( | ||
| - node->getLayout().hadOverflow() | | ||
| + node->getLayout().hadOverflow() || |
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.
| "permitted. You must either @synthesize the bridge property, " | ||
| "or provide your own setter method.", | ||
| - RCTBridgeModuleNameForClass(strongModule)); | ||
| + RCTBridgeModuleNameForClass(Class(strongModule))); |
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.
| } | ||
|
|
||
| -- (NSArray<RCTModuleData *> *)_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules | ||
| +- (NSArray<RCTModuleData *> *)_initializeModules:(NSArray<Class> *)modules |
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.
| platform :ios, '11.0' | ||
| require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' | ||
|
|
||
| def add_flipper_pods!(versions = {}) |
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_flipper script, but this requires upgrading react-native (https://fbflipper.com/docs/getting-started/react-native-ios/#react-native-063).





When I attempted to run the
react-nativeexample app I faced multiple issues. Most of them stem from the fact that the repo hasn't been updated for a while and unfortunately the codebase looks like it's not actively maintained anymore. In this PR I tried to fix the build and runtime errors I stumbled upon.Please, keep in mind that these fixes are just a stopgap and the example app should be properly updated to support the newer version of
react-nativeframework and the corresponding build tools (Xcode, Cocoapods, Node, etc).