inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

iOS/Android 앱 개발을 위한 실전 React Native - Basic

Image

ios에서 이미지가 안뜨네요..

1536

장진영

작성한 질문수 2

0

안드로이드에서는 정상적으로 이미지가 로딩이 되는데

ios에서 실행 시 이미지가 보이지 않네요 ㅠㅠ

일시적인 오류로 안됬던것일수도 있다 생각들어 다음강의로 넘어가던 중  Header Bar에 이미지를 넣는 부분에서도 ios에서는 안뜨구요.. 

es6 react-native react

답변 3

3

dev538

image 가 안뜨는 버그 수정 방법 공유합니다.

1.- run "npm i -g patch-package"
2.- Make a new folder called patches
3.- Make a new file called react-native+0.63.0.patch inside that folder
4.- Add the source code above.
5.- run "patch-package" on the root of the project

------------------------------

diff --git a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
index 21f1a06..2444713 100644
--- a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
+++ b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
@@ -272,6 +272,9 @@ - (void)displayDidRefresh:(CADisplayLink *)displayLink
 
 - (void)displayLayer:(CALayer *)layer
 {
+  if (!_currentFrame) {
+    _currentFrame = self.image;
+  }
   if (_currentFrame) {
     layer.contentsScale = self.animatedImageScale;
     layer.contents = (__bridge id)_currentFrame.CGImage;
diff --git a/node_modules/react-native/scripts/.packager.env b/node_modules/react-native/scripts/.packager.env
new file mode 100644
index 0000000..361f5fb
--- /dev/null
+++ b/node_modules/react-native/scripts/.packager.env
@@ -0,0 +1 @@
+export RCT_METRO_PORT=8081

 

1

Wintho

장진영,

안녕하세요. 지식공유자 Wintho입니다.

 

혹시 사용하고 계시는 iOS 버전이 어떻게 되시는지요?

찾아보니 13.5 14.0에서 image가 안 뜬다는 issue 보고가 있네요..

https://github.com/facebook/react-native/issues/29279

https://github.com/facebook/react-native/issues/29215

 

감사합니다.

0

장진영

감사합니다 ㅠㅠ 링크에 나와있는 내용대로 하니까 이미지가 정상적으로 나오네요 ㅠㅠㅠ

강의 자료 소스코드는 없나요?

0

319

1

RN 자동완성 기능 질문

0

307

1

환경변수 및 SOURCE관련 질문

0

286

1

글로벌로 설치한다는 게 무슨 말인가요? (-g)

0

311

1

VIsual studio code 에서 react-native run-android 실행시 오류

0

840

2

리액트 네이티브에서 안드로이드 실행

0

557

1

vscode

0

403

2

안드로이드 에뮬레이터 에러...

0

962

1

웹뷰앱 만드는 자세한 방법이 궁금합니다.

0

422

0

App.js 화면 수정 시 안드로이드 emulator 오류

0

339

0

2

0

230

1

ios 구동했을 때 Welcome to React가 아니라 애플

0

470

1

1

0

202

0

진행중 막혀서 질문드립니다

0

374

0

drawer 파트

0

282

0

node.js 설치 오류

0

433

0

vs code 터미널에서의 command not found

0

1556

1

node js 10.15.1 설치가 안됩니다

0

303

0

Unable to boot device in current state: Booted 오류 발생하는경우

1

3182

0

adb 커맨드

1

525

1

Slider만 설치하면 애러가 납니다.

0

308

1

bounces 와 버튼 backgroundColor은 안드로이드에서 적용이 안되는건가요?

0

217

0

오류확인 부탁드립니다.

0

307

0

안드로이드 시뮬 작동 중 오류가 납니다.

0

233

0