Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

iOS 14 Image not loading #438

Open
tomacotuna opened this issue Dec 1, 2020 · 6 comments
Open

iOS 14 Image not loading #438

tomacotuna opened this issue Dec 1, 2020 · 6 comments

Comments

@tomacotuna
Copy link

Been using this project from some time in my Side Project, but I noticed recently that on the latest version of iOS 14 the images fail to load and you are left with a black screen, you can still swipe between images and close it with gestures, even save to gallery all works fine. But they just don't get displayed.

@Caundy
Copy link

Caundy commented Dec 1, 2020

Pretty sure there's an issue template in which you should list all the packages' versions and environment, but on the off-chance that you recently switched to building with xcode12+, don't run the latest version of react-native and none of the images display, regardless of whether shown in rn-image-viewer or displayed out of it, you might want to check this issue out: facebook/react-native#29990

@tomacotuna
Copy link
Author

Sorry for not using a template, wasn't given the option to do such.

Here is the list of my packages:

    "@react-native-community/async-storage": "^1.9.0",
    "@react-native-community/blur": "^3.4.1",
    "@react-native-community/cameraroll": "1.4.0",
    "@react-native-community/datetimepicker": "^2.4.2",
    "@react-native-community/masked-view": "0.1.10",
    "@react-native-community/netinfo": "^5.7.0",
    "@react-native-community/segmented-control": "^2.1.0",
    "@react-navigation/bottom-tabs": "^5.7.0",
    "@react-navigation/compat": "^5.2.0",
    "@react-navigation/material-top-tabs": "^5.2.13",
    "@react-navigation/native": "^5.7.0",
    "@react-navigation/native-stack": "^5.0.5",
    "@react-navigation/stack": "5.7.0",
    "@reduxjs/toolkit": "^1.3.4",
    "@rnhooks/async-storage": "^0.0.1",
    "@sentry/react-native": "^1.3.7",
    "@styled-system/theme-get": "^5.1.2",
    "@types/lodash": "^4.14.149",
    "@types/react-redux": "^7.1.7",
    "@types/styled-system": "^5.1.6",
    "apisauce": "1.0.3",
    "babel-plugin-idx": "^2.4.0",
    "babel-plugin-import": "^1.13.0",
    "babel-plugin-styled-components": "^1.10.7",
    "babel-plugin-transform-inline-environment-variables": "^0.4.3",
    "dayjs": "^1.8.20",
    "i18n-js": "^3.0.11",
    "idx": "^2.5.6",
    "lodash": "^4.17.15",
    "lottie-ios": "3.1.3",
    "lottie-react-native": "^3.4.0",
    "nodeless-trakt": "https://github.com/caitlinelfring/nodeless-trakt.git",
    "polished": "^3.4.4",
    "ramda": "0.26.1",
    "react": "16.13.1",
    "react-native": "0.63.0",
    "react-native-chart-kit": "^5.6.0",
    "react-native-color-wheel": "^0.1.7",
    "react-native-console-time-polyfill": "^1.2.1",
    "react-native-context-menu-view": "^1.1.2",
    "react-native-device-info": "^7.2.1",
    "react-native-elements": "^1.2.7",
    "react-native-fast-image": "^8.1.5",
    "react-native-flash-message": "^0.1.15",
    "react-native-gesture-handler": "^1.6.1",
    "react-native-haptic-feedback": "^1.9.0",
    "react-native-image-header-scroll-view": "^0.10.3",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-inappbrowser-reborn": "^3.4.0",
    "react-native-keychain": "3.1.3",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-localize": "^1.4.0",
    "react-native-modal-datetime-picker": "8.9.3",
    "react-native-openanything": "^0.0.6",
    "react-native-reanimated": "^1.9.0",
    "react-native-safe-area-context": "3.1.1",
    "react-native-screens": "^2.9.0",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-tab-view": "^2.13.0",
    "react-native-vector-icons": "^6.6.0",
    "react-native-youtube": "^2.0.1",
    "react-navigation": "4.4.0",
    "react-spring": "^8.0.27",
    "reanimated-bottom-sheet": "^1.0.0-alpha.19",
    "recyclerlistview": "^2.0.12",
    "yarn": "^1.22.4"

I am indeed using the latest Xcode version, and RN 0.63 so not the latest one. That being said I am not sure if the issue link you gave is the cause of this issues, since all the other Images in my app work. But will have a deeper look into that issue once home.

UPDATE: in the meantime it seems like I was able to make the Image appear by rendering them using a custom React Element with renderImage

@hzw0407
Copy link

hzw0407 commented Feb 26, 2021

Modify node_ React native / libraries / image / rctuiimageviewanimals. M file in modules

if(_currentFrame) {
layer.contentsScale = self.animatedImageScale;
layer.contents = (__bridge id)_currentFrame.CGImage;
}else {
[super displayLayer:layer];
}

@Yandamuri
Copy link

@hzw0407 we have to do this on every npm install, right!. any permanent solution?

@bkensey
Copy link

bkensey commented Sep 2, 2021

@Yandamuri You can look into using patch-package to apply manual changes to your node modules automatically during postinstall after every npm install.

@Yandamuri
Copy link

@bkensey Thank you for your suggestion

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants