facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.37k stars 24.25k forks source link

React-Native upgrade issues #31887

Closed byennen closed 3 years ago

byennen commented 3 years ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch react-native@0.62.3 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
index 21f1a06..baed04a 100644
--- a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
+++ b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
@@ -272,9 +272,14 @@ static NSUInteger RCTDeviceFreeMemory() {

 - (void)displayLayer:(CALayer *)layer
 {
+  if (!_currentFrame) {
+    _currentFrame = self.image;
+  }
   if (_currentFrame) {
     layer.contentsScale = self.animatedImageScale;
     layer.contents = (__bridge id)_currentFrame.CGImage;
+  } else {
+    [super displayLayer:layer];
   }
 }

This issue body was partially generated by patch-package.

byennen commented 3 years ago

pod install issues

    - If necessary, you can disable autolinking for the dependency and link it manually. See https://github.com/react-native-community/cli/blob/master/docs/autolinking.md#how-can-i-disable-autolinking-for-unsupported-library
➜  ios git:(dependabot/npm_and_yarn/react-native-0.62.3) βœ— pod install --repo-update
Adding a custom script phase for Pod RNFBApp: [RNFB] Core Configuration
Auto-linking React Native modules for target `VID`: BVLinearGradient, BugsnagReactNative, CodePush, RNAWSCognito, RNCAsyncStorage, RNCMaskedView, RNDateTimePicker, RNFBApp, RNFBMessaging, RNFS, RNGestureHandler, RNHoleView, RNPermissions, RNReanimated, RNSVG, RNScreens, RNShare, RNSnackbar, ReactNativeKeyboardManager, appcenter-analytics, appcenter-core, appcenter-crashes, react-native-blur, react-native-camera, react-native-document-picker, react-native-netinfo, react-native-pdf, react-native-progress-bar-android, react-native-progress-view, react-native-safe-area-context, react-native-splash-screen, react-native-text-input-mask, react-native-webview, and rn-fetch-blob
Updating local specs repositories
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker":
  In snapshot (Podfile.lock):
    ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)

  In Podfile:
    ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)

None of your spec sources contain a spec satisfying the dependency: `ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

[!] use_native_modules! skipped the react-native dependency 'react-native-sliding-up-down-panels'. No podspec file was found.
    - Check to see if there is an updated version that contains the necessary podspec file
    - Contact the library maintainers or send them a PR to add a podspec. The react-native-webview podspec is a good example of a package.json driven podspec. See
    https://github.com/react-native-community/react-native-webview/blob/master/react-native-webview.podspec
    - If necessary, you can disable autolinking for the dependency and link it manually. See https://github.com/react-native-community/cli/blob/master/docs/autolinking.md#how-can-i-disable-autolinking-for-unsupported-library
safaiyeh commented 3 years ago

Hi @byennen can you please fill out the issue template? Looks like this is proposing a fix, fill out the template for the bug report and then a follow up PR for the fix.

github-actions[bot] commented 3 years ago
:warning: Missing Required Fields
:information_source: It looks like your issue may be missing some necessary information. GitHub provides an example template whenever a new issue is created. Could you go back and make sure to fill out the template? You may edit this issue, or close it and open a new one.
byennen commented 3 years ago

@safaiyeh ty