React-native: ์ด๋ฏธ์ง€๋Š” iOS 14์—์„œ ์ด๋ฏธ์ง€๋ฅผ ํ‘œ์‹œํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค

์— ๋งŒ๋“  2020๋…„ 07์›” 06์ผ  ยท  125์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: facebook/react-native

์ด๋ฏธ์ง€๋Š” iOS 14์—์„œ ์ด๋ฏธ์ง€๋ฅผ ํ‘œ์‹œํ•  ์ˆ˜ ์—†์ง€๋งŒ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์œ„์น˜๋ฅผ ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
์ถœ์ฒ˜={
ํ•„์š”('./์ด๋ฏธ์ง€/add_scan_images.png')
}
/>

ํ™˜๊ฒฝ:
Xcode ๋ฒ„์ „ 12.0 ๋ฒ ํƒ€(12A6159)
์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ: iPhone SE - 2์„ธ๋Œ€ - 14.0
"๋ฐ˜์‘": "16.11.0",
"๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ": "0.62.2"

Image Author Feedback Issue Template iOS iOS 14

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

_currentFrame์ด nil์ธ ๊ฒฝ์šฐ [super displayLayer:layer]; ๋ฅผ ์ถ”๊ฐ€ํ•œ ํ›„ ์ด๋ฏธ์ง€๋ฅผ ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‚ด๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ดํ•ดํ•œ๋‹ค๋ฉด _currentFrame์€ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ด๋ฏธ์ง€์šฉ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์Šคํ‹ธ ์ด๋ฏธ์ง€์ธ ๊ฒฝ์šฐ UIImage ๊ตฌํ˜„์„ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€ ๋ Œ๋”๋ง์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ์ง€๋งŒ ์˜ฌ๋ฐ”๋ฅธ ์ˆ˜์ •์ธ์ง€ ํ™•์‹ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

https://github.com/facebook/react-native/blob/1c634a921887caf02f1b9fba6fd177c352f9ef78/Libraries/Image/RCTUIImageViewAnimated.m#L283 -L289

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

๋ชจ๋“  125 ๋Œ“๊ธ€

:๊ฒฝ๊ณ :๋ˆ„๋ฝ๋œ ํ™˜๊ฒฝ ์ •๋ณด
:์ •๋ณด ์ถœ์ฒ˜:๋ฌธ์ œ์— ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์— ๋Œ€ํ•œ ์ •๋ณด๊ฐ€ ๋ˆ„๋ฝ๋˜์—ˆ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ฝ˜์†”์—์„œ react-native info ๋ฅผ ์‹คํ–‰ํ•˜์—ฌ ๋ˆ„๋ฝ๋œ ์ •๋ณด๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋™์ผํ•œ ๋ฌธ์ œ์— ์ง๋ฉดํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

System:
    OS: macOS 10.16
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 493.38 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.4.0 - ~/.nvm/versions/node/v14.4.0/bin/node
    Yarn: 1.22.4 - ~/.nvm/versions/node/v14.4.0/bin/yarn
    npm: 6.14.5 - ~/.nvm/versions/node/v14.4.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 25, 27, 28, 29
      Build Tools: 28.0.3, 29.0.0
      System Images: android-27 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6308749
    Xcode: 11.5/11E608c - /usr/bin/xcodebuild
  Languages:
    Python: 2.7.16 - /usr/local/bin/python
  npmPackages:
    @react-native-community/cli: ^4.5.1 => 4.5.1 
    react: 16.11.0 => 16.11.0 
    react-native: 0.62.0 => 0.62.0 
  npmGlobalPackages:
    *react-native*: Not Found

๊ทธ๋Ÿฌ๋‚˜ Xcode-๋ฒ ํƒ€ ๋ฐ iOS 14์—์„œ ๋ฉ”์‹ ์ €

๋‚˜๋Š” ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€์žˆ๋‹ค!

๊ฐ™์€ ๋ฌธ์ œ...

๊ฐ™์€ ๋ฌธ์ œ...

์ข‹์•„, ์ด๋ฏธ์ง€ ๋ฌธ์ œ๋Š” Xcode 12 ๋ฒ ํƒ€๋กœ ๋นŒ๋“œํ•  ๋•Œ๋งŒ ๋ฐœ์ƒํ•œ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์—ฌ๊ธฐ ์—์„œ ์–ป์€ iOS 14.0 ๋ฒ ํƒ€ ์žฅ์น˜ ์ง€์›์„ ์‚ฌ์šฉํ•˜์—ฌ Xcode 11.5๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋นŒ๋“œ๋ฅผ ๋งŒ๋“ค๋ฉด ์ด๋ฏธ์ง€๊ฐ€ ์ œ๋Œ€๋กœ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

์ด๊ฒƒ์€ ์ค‘๋ณต ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค -- https://github.com/facebook/react-native/issues/29215

:๊ฒฝ๊ณ :ํ•„์ˆ˜ ํ•„๋“œ ๋ˆ„๋ฝ
:์ •๋ณด ์ถœ์ฒ˜:๋ฌธ์ œ์— ํ•„์š”ํ•œ ์ •๋ณด๊ฐ€ ๋ˆ„๋ฝ๋œ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. GitHub๋Š” ์ƒˆ ๋ฌธ์ œ๊ฐ€ ์ƒ์„ฑ ๋  ๋•Œ๋งˆ๋‹ค ์˜ˆ์ œ ํ…œํ”Œ๋ฆฟ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ๋Œ์•„๊ฐ€์„œ ํ…œํ”Œ๋ฆฟ์„ ์ž‘์„ฑํ–ˆ๋Š”์ง€ ํ™•์ธํ•ด ์ฃผ์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ? ์ด ๋ฌธ์ œ๋ฅผ ํŽธ์ง‘ํ•˜๊ฑฐ๋‚˜ ๋‹ซ๊ณ  ์ƒˆ ๋ฌธ์ œ๋ฅผ ์—ด โ€‹โ€‹์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

react-native+0.63.0.patch ์‚ฌ์šฉ

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

react-native+0.63.0.patch ์‚ฌ์šฉ

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

ํŒจ์น˜ ํŒจํ‚ค์ง€๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ด๊ฒƒ์„ ์–ด๋–ป๊ฒŒ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๊นŒ? ํŒจ์น˜ ํŒจํ‚ค์ง€๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์ดˆ๋ณด์ž.

react-native+0.63.0.patch ์‚ฌ์šฉ

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.- "npm i -g patch-package" ์‹คํ–‰
2.- ํŒจ์น˜๋ผ๋Š” ์ƒˆ ํด๋”๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
3.- ํ•ด๋‹น ํด๋” ์•ˆ์— react-native+0.63.0.patch๋ผ๋Š” ์ƒˆ ํŒŒ์ผ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
4.- ์œ„์˜ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
5.- ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ์—์„œ "patch-package" ์‹คํ–‰

react-native+0.63.0.patch ์‚ฌ์šฉ

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.- "npm i -g patch-package" ์‹คํ–‰
2.- ํŒจ์น˜๋ผ๋Š” ์ƒˆ ํด๋”๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
3.- ํ•ด๋‹น ํด๋” ์•ˆ์— react-native+0.63.0.patch๋ผ๋Š” ์ƒˆ ํŒŒ์ผ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
4.- ์œ„์˜ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
5.- ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ์—์„œ "patch-package" ์‹คํ–‰

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

_currentFrame์ด nil์ธ ๊ฒฝ์šฐ [super displayLayer:layer]; ๋ฅผ ์ถ”๊ฐ€ํ•œ ํ›„ ์ด๋ฏธ์ง€๋ฅผ ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‚ด๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ดํ•ดํ•œ๋‹ค๋ฉด _currentFrame์€ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ด๋ฏธ์ง€์šฉ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์Šคํ‹ธ ์ด๋ฏธ์ง€์ธ ๊ฒฝ์šฐ UIImage ๊ตฌํ˜„์„ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€ ๋ Œ๋”๋ง์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ์ง€๋งŒ ์˜ฌ๋ฐ”๋ฅธ ์ˆ˜์ •์ธ์ง€ ํ™•์‹ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

https://github.com/facebook/react-native/blob/1c634a921887caf02f1b9fba6fd177c352f9ef78/Libraries/Image/RCTUIImageViewAnimated.m#L283 -L289

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

๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ 0.62.x์™€ ๋™์ผํ•œ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. ์ˆ˜์ • ์‚ฌํ•ญ์ด ํŒฉ ์ด์‹๋  ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ์Šต๋‹ˆ๊นŒ? RN 0.63.x๋Š” ์—ฌ์ „ํžˆ ๋งค์šฐ ๋ฒ„๊ทธ๊ฐ€ ์žˆ์–ด ์—…๊ทธ๋ ˆ์ด๋“œํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ 0.62.x์™€ ๋™์ผํ•œ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. ์ˆ˜์ • ์‚ฌํ•ญ์ด ํŒฉ ์ด์‹๋  ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ์Šต๋‹ˆ๊นŒ? RN 0.63.x๋Š” ์—ฌ์ „ํžˆ ๋งค์šฐ ๋ฒ„๊ทธ๊ฐ€ ์žˆ์–ด ์—…๊ทธ๋ ˆ์ด๋“œํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

์ง€๊ธˆ์€ ํฌํฌ๋ฅผ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜ ํŒจ์น˜ ํŒจํ‚ค์ง€๋ฅผ ์ ์šฉํ•˜๋Š” ๊ฒƒ์ด ๊ฐ€์žฅ ์ข‹์Šต๋‹ˆ๋‹ค.

์ œ์•ˆ๋œ ํŒจ์น˜๋ฅผ ์ ์šฉํ•˜์—ฌ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ด์ „ RN ๋ฒ„์ „์—์„œ ์ž˜ ์ž‘๋™ํ•จ์„ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

RN: 0.62.2
์—‘์Šค์ฝ”๋“œ: 12.0
iOS ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ: 14

์„ค๋ช…์„ ์ถ”๊ฐ€ํ•˜๋ฉด(๋‚˜ ๊ฐ™์€ patch-package ์— ๋Œ€ํ•œ ๋‹ค๋ฅธ ์ดˆ๋ณด์ž๋ฅผ ์œ„ํ•ด) "ํŒจ์น˜" ํด๋”๋Š” ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ ์ˆ˜์ค€์œผ๋กœ ์ด๋™ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์ด๊ฒƒ์„ ์œ„ํ•ด ํŒจ์น˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์€ ๊ณผ๋„ํ•˜๊ฒŒ ๋ณด์ž…๋‹ˆ๋‹ค. 0.62.2์— ๋งˆ์ด๋„ˆ ํŒจ์น˜๋กœ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒƒ์ด ๋„ˆ๋ฌด ์–ด๋ ต์Šต๋‹ˆ๊นŒ(์•„๋งˆ๋„ 0.62.3์œผ๋กœ ๋งŒ๋“œ์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ?). ์ •๋ง 3์ค„์˜ ์ฝ”๋“œ์ž…๋‹ˆ๋‹ค.

ํ˜„์žฌ์™€ โ€‹โ€‹๊ฐ™์ด 0.63.x์—๋Š” ๋ช‡ ๊ฐ€์ง€ ์ฃผ์š” ๋ฒ„๊ทธ๊ฐ€ ์žˆ์œผ๋ฉฐ ์กฐ๋งŒ๊ฐ„ ํ•ด๊ฒฐ๋˜์ง€ ์•Š์„ ๊ฒƒ ๊ฐ™์œผ๋ฏ€๋กœ(0.64.x๊ฐ€ ๊ณง ์ถœ์‹œ๋จ) ๊ฐ€๊นŒ์šด ์žฅ๋ž˜์— 0.62๋กœ ๊ณ ์ •๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

์ด๊ฒƒ์„ ์œ„ํ•ด ํŒจ์น˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์€ ๊ณผ๋„ํ•˜๊ฒŒ ๋ณด์ž…๋‹ˆ๋‹ค.

ํŒจ์น˜ ํŒจํ‚ค์ง€๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ๋งˆ์‹ญ์‹œ์˜ค...

ํŒจ์น˜ ํŒจํ‚ค์ง€๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์ง€ ์•Š๊ณ  ์•ฑ์„ ์ตœ์‹  ๋ฒ„์ „์œผ๋กœ ์—…๋ฐ์ดํŠธํ•˜๊ณ  ์‹ถ์ง€ ์•Š์ง€๋งŒ ์™œ ๊ฐœ๋ฐœ์ž๊ฐ€ ์ „์ฒด ๋กœ๋“œ๋งต์„ ๋ฌด์‹œํ•˜๋„๋ก "๊ฐ•์ œ"ํ•ฉ๋‹ˆ๊นŒ?
์™œ ๋‹น์‹ ์€ ๋ฌด์–ธ๊ฐ€๋ฅผ ํ•˜๊ณ  ์‹ถ์ง€ ์•Š๊ณ  ์‚ฌ๋žŒ๋“ค์ด ๋‹น์‹ ์ด ์›ํ•˜๋Š” ๊ฒƒ์„ ํ•˜๊ฒŒ ๋งŒ๋“ค๊ณ  ์‹ถ์Šต๋‹ˆ๊นŒ?

ํŒจ์น˜๋Š” ์—ฌ๊ธฐ์—์„œ ์™„๋ฒฝํ•˜๊ฒŒ ์ž‘๋™ํ–ˆ์Šต๋‹ˆ๋‹ค. 0.62.2

๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ 0.62.x์™€ ๋™์ผํ•œ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. ์ˆ˜์ • ์‚ฌํ•ญ์ด ํŒฉ ์ด์‹๋  ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ์Šต๋‹ˆ๊นŒ? RN 0.63.x๋Š” ์—ฌ์ „ํžˆ ๋งค์šฐ ๋ฒ„๊ทธ๊ฐ€ ์žˆ์–ด ์—…๊ทธ๋ ˆ์ด๋“œํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

Hey man, ์ด๊ฒƒ์„ react-native+0.62.2.patch ์•„๋ž˜์˜ ํŒจ์น˜ ํด๋”์— ์ถ”๊ฐ€ํ•˜์„ธ์š”.

diff --git a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
index 21f1a06..0ff66f3 100644
--- a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
+++ b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
@@ -275,6 +275,8 @@ - (void)displayLayer:(CALayer *)layer
   if (_currentFrame) {
     layer.contentsScale = self.animatedImageScale;
     layer.contents = (__bridge id)_currentFrame.CGImage;
+  } else {
+    [super displayLayer:layer];
   }
 }

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

npx patch-package ์‹คํ–‰

0.61.5 ํŒจ์น˜์ž…๋‹ˆ๋‹ค.

diff --git a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
index 01aa75f..24c1075 100644
--- a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
+++ b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
@@ -267,8 +267,10 @@ - (void)displayDidRefresh:(CADisplayLink *)displayLink
 - (void)displayLayer:(CALayer *)layer
 {
   if (_currentFrame) {
-    layer.contentsScale = self.animatedImageScale;
-    layer.contents = (__bridge id)_currentFrame.CGImage;
+      layer.contentsScale = self.animatedImageScale;
+      layer.contents = (__bridge id)_currentFrame.CGImage;
+  } else {
+      [super displayLayer:layer];
   }
 }

ํ•ญ์ƒ ์ด๋ฏธ์ง€ ๊ตฌ์„ฑ ์š”์†Œ๋ฅผ FastImage๋กœ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ ‡๊ฒŒ ํ•˜๋ฉด ์•„๋ฌด๊ฒƒ๋„ ํŒจ์น˜ํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. ์ด๋ฏธ์ง€๋„ ๋” ์ž˜ ๋กœ๋“œ๋ฉ๋‹ˆ๋‹ค.

patch-package ์ˆ˜์ • ํ”„๋กœ๊ทธ๋žจ์„ ์‚ฌ์šฉ ์ค‘์ด๊ณ  CI/CD ์„ค์ •์ด ์žˆ๋Š” ์‚ฌ๋žŒ์€ package.json ์— "postinstall": "patch-package" ๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒƒ์„ ์žŠ์ง€ ๋งˆ์‹ญ์‹œ์˜ค.

ํ•ญ์ƒ ์ด๋ฏธ์ง€ ๊ตฌ์„ฑ ์š”์†Œ๋ฅผ FastImage๋กœ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ ‡๊ฒŒ ํ•˜๋ฉด ์•„๋ฌด๊ฒƒ๋„ ํŒจ์น˜ํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. ์ด๋ฏธ์ง€๋„ ๋” ์ž˜ ๋กœ๋“œ๋ฉ๋‹ˆ๋‹ค.

FastImage๋Š” ๋งŽ์€ ๋ฒ„๊ทธ๊ฐ€ ์žˆ๋Š” ์œ ์ง€ ๊ด€๋ฆฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค.

์™œ ๋” ๋‚ซ๋‹ค๊ณ  ์ƒ๊ฐํ•˜์„ธ์š”?

FastImage๊ฐ€ ์ž‘๋™ ์ค‘์ž…๋‹ˆ๋‹ค. ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

@johnlim5847 "postinstall"์„ ์ถ”๊ฐ€ํ•  ์œ„์น˜: "patch-package" package.json์˜ ์ด ์ค„์€?

์‹คํ–‰ ์‹œ ์ด ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•จ: npx patch-package
ํŒจ์น˜ ์ ์šฉ ์ค‘...
์˜ค๋ฅ˜: node_modules/ react-native์— ์—†๋Š” react-native ํŒจํ‚ค์ง€์— ๋Œ€ํ•œ ํŒจ์น˜ ํŒŒ์ผ์„ ์ฐพ์•˜์Šต๋‹ˆ๋‹ค.

@shrimallamanoj ๋จผ์ € https://github.com/ds300/patch-package ๋กœ ์ด๋™ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์˜ˆ ... ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค ๋‹จ๊ณ„๋ฅผ ๋”ฐ๋ฅด๊ณ  ํŒจ์น˜๊ฐ€ ์„ฑ๊ณต์ ์œผ๋กœ ์ ์šฉ๋˜์—ˆ์œผ๋ฉฐ npx๋ฅผ ์‹คํ–‰ํ•  ๋•Œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜์ง€ ์•Š์ง€๋งŒ ์†”๋ฃจ์…˜์ด ์ž‘๋™ํ•˜์ง€ ์•Š๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๋‚˜์œ ... ๋‹ค๋ฅธ ์†”๋ฃจ์…˜์€ ๋ฌด์—‡์ž…๋‹ˆ๊นŒ?

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

์—ฌ๋Ÿฌ๋ถ„, ์ด ํŒจ์น˜๋Š” React ๋„ค์ดํ‹ฐ๋ธŒ 0.61.5์—์„œ๋„ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ๋™์ผํ•œ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

1.- "yarn add patch-package" ์‹คํ–‰
2.- ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ์— ํŒจ์น˜๋ผ๋Š” ์ƒˆ ํด๋”๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
3.- ํ•ด๋‹น ํด๋” ์•ˆ์— react-native+0.61.5.patch๋ผ๋Š” ์ƒˆ ํŒŒ์ผ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
4.- ์œ„์˜ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
5.- ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ์—์„œ "yarn patch-package"๋ฅผ ์‹คํ–‰ํ•˜๊ฑฐ๋‚˜ ์„ค์น˜ ํ›„ ์Šคํฌ๋ฆฝํŠธ์— ๋„ฃ์Šต๋‹ˆ๋‹ค.

์ด ๋งํฌ ๋ฅผ ๋”ฐ๋ผ IOS14์˜ ์ด๋ฏธ์ง€ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•ฉ๋‹ˆ๋‹ค.

  • Xcode์—์„œ ํด๋ฆฐ ๋นŒ๋“œ(CMD + Shift + K)
  • npx react-native start --reset-cache๋กœ ์บ์‹œ ์žฌ์„ค์ •
  • XCode๋กœ ๋นŒ๋“œํ•˜๋ฉด ๋ชจ๋“  ๊ฒƒ์ด ๋‹ค์‹œ ์ž˜ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.
    ๋‚˜๋Š” React ๋„ค์ดํ‹ฐ๋ธŒ 0.62.2๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
    GL ๋ชจ๋‘์—๊ฒŒ.

์ˆ˜์ •์ด ์•„๋‹ˆ๋ผ ๊ด€์ฐฐ๋‚ด๋ถ€์—์ด๋ฏธ์ง€๋ฅผ ๋ณด์—ฌ์ฃผ๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๋™์ผํ•œ ๋ฒ„๊ทธ๊ฐ€ ํ‘œ์‹œ๋˜์ง€๋งŒ ๊ฐœ๋ฐœ ํ”„๋กœ์„ธ์Šค ์ค‘์—๋งŒ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ํœด๋Œ€ํฐ๊ณผ xcode ํ”„๋กœ๊ทธ๋žจ์„ ์—…๋ฐ์ดํŠธํ•œ ํ›„์— ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. (ios14, xcode12) ์ด์ƒํ•œ ์ ์€ ๋งˆ์ผ“์—์„œ ๋‚ด ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋‹ค์šด๋กœ๋“œํ•  ๋•Œ ์ •์  ์‚ฌ์ง„์„ ๋ณผ ์ˆ˜ ์—†๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋‹ค๋ฅธ ํฐ์—์„œ ์‹œ๋„ํ•˜๋ฉด ์‚ฌ์ง„์ด ๋ณด์ž…๋‹ˆ๋‹ค. ์—…๋ฐ์ดํŠธ ํ›„ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์ด ์™„์ „ํžˆ ๋ง๊ฐ€์กŒ์Šต๋‹ˆ๋‹ค.

์œ„์—์„œ @tomcheung ์ด ์ œ์•ˆํ•œ ๋Œ€๋กœ RCTUIImageViewAnimated.m ํŒŒ์ผ์„ ์ˆ˜๋™์œผ๋กœ ํŽธ์ง‘ํ•˜๋ฉด ๋ฒ„์ „ 0.61.5์˜ ๋ฌธ์ œ๊ฐ€ ์ˆ˜์ •๋ฉ๋‹ˆ๋‹ค. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

์ œ์•ˆ: ํŒจ์น˜ 0.63 ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜์ง€ ๋งˆ์‹ญ์‹œ์˜ค. ์—…๊ทธ๋ ˆ์ด๋“œ๋ฅผ ์‹œ๋„ํ–ˆ์ง€๋งŒ firebase , code-push ๋กœ ์ธํ•ด ๋นŒ๋“œ์— ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค.

์—ฌ์ „ํžˆ ์ด ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ๊ฒฝ์šฐ ํŒจ์น˜๊ฐ€ ํ˜„์žฌ ๋ฌธ์ œ์— ๋Œ€ํ•œ ์ตœ์ƒ์˜ ์†”๋ฃจ์…˜์ธ์ง€ ์กฐ์–ธํ•  ์ˆ˜ ์žˆ๋Š” ์‚ฌ๋žŒ์ด ์žˆ์Šต๋‹ˆ๊นŒ?

0.61.2 ํŒจ์น˜๊ฐ€ ์žˆ๋‚˜์š”?

0.61.2 ํŒจ์น˜๊ฐ€ ์žˆ๋‚˜์š”?

๋‚˜๋ฅผ์œ„ํ•œ. ํ•ด๊ฒฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

0.62.2 ํ•ด๊ฒฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์‹ค์ œ ์žฅ์น˜๋Š” ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค....
ํ•ด๊ฒฐ์ฑ…์ด ์žˆ์Šต๋‹ˆ๊นŒ?

https://github.com/huylvdev/react-native-fix-image ๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค

if (_currentFrame) {
layer.contentsScale = self.animatedImageScale;
layer.contents = (__๋ธŒ๋ฆฟ์ง€ ์•„์ด๋””)_currentFrame.CGImage;
} ๋˜ ๋‹ค๋ฅธ {
[์ˆ˜ํผ ๋””์Šคํ”Œ๋ ˆ์ด ๋ ˆ์ด์–ด:๋ ˆ์ด์–ด ];
}

์œ„์น˜: /node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m

๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค, ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค

๋‚˜๋ฅผ์œ„ํ•œ. ํ•ด๊ฒฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค ์ดํ•ด๋ฅผ ๋ชปํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค ๋ฌด์Šจ ๋ง์”€์ด์„ธ์š”? ์–ด๋–ค ํŒจ์น˜๋ฅผ ์ ์šฉํ•˜์…จ๋‚˜์š”?

๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ•œ ์†”๋ฃจ์…˜์€ ๋…ธ๋“œ ๋ชจ๋“ˆ ๋‚ด๋ถ€์—์„œ ์ˆ˜์ •ํ•ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์ผ์‹œ์ ์œผ๋กœ ์ˆ˜์ •ํ•ฉ๋‹ˆ๋‹ค. ์•ž์œผ๋กœ ์ด๋Ÿฌํ•œ ์ผ์ด ๋ฐœ์ƒํ•˜์ง€ ์•Š๋„๋ก ๋ฐฉ์ง€ํ•  ์ˆ˜ ์žˆ๋Š” ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๊นŒ?

๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ ๋ฒ„์ „์˜ ๊ฒฝ์šฐ < 0.63
ReactNative Image ๋Œ€์‹  react-native-fast image ๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”.
react-native-fast-image ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋ ค๋ฉด react-native-fast- image ์˜ ํด๋ฐฑ ์„ ๋น„ํ™œ์„ฑํ™”ํ•˜์‹ญ์‹œ์˜ค.
IOS 14์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค!

๋‚˜๋ฅผ์œ„ํ•œ. ํ•ด๊ฒฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค ์ดํ•ด๋ฅผ ๋ชปํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค ๋ฌด์Šจ ๋ง์”€์ด์„ธ์š”? ์–ด๋–ค ํŒจ์น˜๋ฅผ ์ ์šฉํ•˜์…จ๋‚˜์š”?

@EmmanueleVilla ์ด ํŒจ์น˜๋ฅผ https://github.com/facebook/react-native/issues/29279#issuecomment -658244428 ์ ์šฉํ•œ ๋‹ค์Œ ํŒจ์น˜ ํŒจํ‚ค์ง€ ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์œ ์ง€ํ•˜์„ธ์š”. :)

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

์—ฌ๋Ÿฌ๋ถ„, ์ด ํŒจ์น˜๋Š” React ๋„ค์ดํ‹ฐ๋ธŒ 0.61.5์—์„œ๋„ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ๋™์ผํ•œ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

1.- "yarn add patch-package" ์‹คํ–‰
2.- ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ์— ํŒจ์น˜๋ผ๋Š” ์ƒˆ ํด๋”๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
3.- ํ•ด๋‹น ํด๋” ์•ˆ์— react-native+0.61.5.patch๋ผ๋Š” ์ƒˆ ํŒŒ์ผ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
4.- ์œ„์˜ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
5.- ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ์—์„œ "yarn patch-package"๋ฅผ ์‹คํ–‰ํ•˜๊ฑฐ๋‚˜ ์„ค์น˜ ํ›„ ์Šคํฌ๋ฆฝํŠธ์— ๋„ฃ์Šต๋‹ˆ๋‹ค.

๋‚˜๋Š” ๋˜ํ•œ 61.5๋ฅผ ์‹คํ–‰ ์ค‘์ž…๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ์ €์—๊ฒŒ ํšจ๊ณผ์ ์ด์—ˆ์Šต๋‹ˆ๋‹ค! 61.5 ์ด์™ธ์˜ ๋ฒ„์ „์ด ์žˆ๋Š” ๊ฒฝ์šฐ ํ•ด๋‹น ๋ฒ„์ „์„ ์‚ฌ์šฉํ•˜๋„๋ก ํŒจ์น˜ ํŒŒ์ผ์˜ ์ด๋ฆ„์„ ๋ณ€๊ฒฝํ•˜๊ณ  yarn patch-package ๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ ๋ฒ„์ „์ด ์ผ์น˜ํ•˜๋Š” ๊ฒƒ์„ ๊ฐ์ง€ํ•˜๋ฏ€๋กœ ํŒจ์น˜๊ฐ€ ์ ์šฉ๋ฉ๋‹ˆ๋‹ค.

์˜ˆ๋ฅผ ๋“ค์–ด ๋ฒ„์ „ 61.2์˜ ๊ฒฝ์šฐ ํŒจ์น˜ ํŒŒ์ผ์˜ ์ด๋ฆ„์„ react-native+0.61.2.patch ๋กœ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.

#import "RCTUIImageViewAnimated+WLAdd.h"
#import <objc/runtime.h>

<strong i="5">@implementation</strong> RCTUIImageViewAnimated (WLAdd)

+ (void)load {
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
    Method fromMethod = class_getInstanceMethod([self class], @selector(displayLayer:));
    Method toMethod = class_getInstanceMethod([self class], @selector(wl_displayLayer:));
    method_exchangeImplementations(fromMethod, toMethod);
  });
}

- (void)wl_displayLayer:(CALayer *)layer {
  UIImage *currentFrame = [self valueForKey:@"currentFrame"];
  CGFloat animatedImageScale = [[self valueForKey:@"animatedImageScale"] floatValue];
  if (currentFrame) {
      layer.contentsScale = animatedImageScale;
      layer.contents = (__bridge id)currentFrame.CGImage;
    } else {
      [super displayLayer:layer];
    }
}

<strong i="6">@end</strong>

์ด๊ฒƒ์€ ํŒจ์น˜ ํŒŒ์ผ์„ ์ƒ์„ฑํ•˜๋Š” ํ›จ์”ฌ ๊ฐ„๋‹จํ•œ ๋ฐฉ๋ฒ•์ด ์žˆ์ง€๋งŒ v0.61.4 ์—์„œ ์ €์—๊ฒŒ ํšจ๊ณผ์ ์ž…๋‹ˆ๋‹ค.

tl;dr https://github.com/ds300/patch-package ์ž์ฒด์˜ ์ง€์นจ์„ ๋”ฐ๋ฅด์‹ญ์‹œ์˜ค.

์ž์„ธํ•œ ์ง€์นจ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.
์ด๊ฒƒ์€ React Native ์†Œ์Šค ์ฝ”๋“œ v0.63.2 ์— ๋Œ€ํ•œ ์ˆ˜์ • ์‚ฌํ•ญ์ž…๋‹ˆ๋‹ค. https://github.com/facebook/react-native/commit/123423c2a9258c9af25ca9bffe1f10c42a176bf3

# make the change in `node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m` file
if (_currentFrame) {
  layer.contentsScale = self.animatedImageScale;
  layer.contents = (__bridge id)_currentFrame.CGImage;
} else {
  [super displayLayer:layer];
}

# run patch-package to create a .patch file
npx patch-package react-native

# this will generate the patch file in the patches folder
# patches/react-native+0.61.4.patch

# then add to postinstall script
"scripts": {
  "postinstall": "patch-package"
 }

๋„์›€์ด ๋˜์—ˆ๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค!

react-native+0.63.0.patch ์‚ฌ์šฉ

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.- "npm i -g patch-package" ์‹คํ–‰
2.- ํŒจ์น˜๋ผ๋Š” ์ƒˆ ํด๋”๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
3.- ํ•ด๋‹น ํด๋” ์•ˆ์— react-native+0.63.0.patch๋ผ๋Š” ์ƒˆ ํŒŒ์ผ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
4.- ์œ„์˜ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
5.- ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ์—์„œ "patch-package" ์‹คํ–‰

RN v0.61.2๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋™์•ˆ ์ด ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ์ง€๋งŒ ์—ฌ์ „ํžˆ ํšจ๊ณผ๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ์‚ฌ ํ•ด์š”

๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ ๋ฒ„์ „์˜ ๊ฒฝ์šฐ < 0.63
ReactNative Image ๋Œ€์‹  react-native-fast image ๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”.
react-native-fast-image ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋ ค๋ฉด react-native-fast- image ์˜ ํด๋ฐฑ ์„ ๋น„ํ™œ์„ฑํ™”ํ•˜์‹ญ์‹œ์˜ค.
IOS 14์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค!

๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ์Šต๋‹ˆ๋‹ค!

์›์‚ฌ ํŒจ์น˜ ํŒจํ‚ค์ง€

๋‚˜๋ฅผ์œ„ํ•œ. ํ•ด๊ฒฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค ์ดํ•ด๋ฅผ ๋ชปํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค ๋ฌด์Šจ ๋ง์”€์ด์„ธ์š”? ์–ด๋–ค ํŒจ์น˜๋ฅผ ์ ์šฉํ•˜์…จ๋‚˜์š”?

@EmmanueleVilla ์ด ํŒจ์น˜ #29279(๋Œ“๊ธ€) ๋ฅผ ์ ์šฉํ•œ ๋‹ค์Œ ํŒจ์น˜ ํŒจํ‚ค์ง€ ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์œ ์ง€ํ•˜์„ธ์š” :)

๋‹น์‹ ์€ ๋‚จ์ž @jkim430 ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค

0.61.4์—์„œ ๋ชจ๋“  ์†”๋ฃจ์…˜์„ ์‹œ๋„ํ–ˆ์ง€๋งŒ ์›๊ฒฉ ์ด๋ฏธ์ง€๋Š” ์ œ๋Œ€๋กœ ๋กœ๋“œ๋˜์ง€๋งŒ ๋กœ์ปฌ ์ž์‚ฐ์€ ํ‘œ์‹œ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

์–ด๋–ค ์•„์ด๋””์–ด?

xcode ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค..
image

_currentFrame์ด nil์ธ ๊ฒฝ์šฐ [super displayLayer:layer]; ๋ฅผ ์ถ”๊ฐ€ํ•œ ํ›„ ์ด๋ฏธ์ง€๋ฅผ ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‚ด๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ดํ•ดํ•œ๋‹ค๋ฉด _currentFrame์€ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ด๋ฏธ์ง€์šฉ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์Šคํ‹ธ ์ด๋ฏธ์ง€์ธ ๊ฒฝ์šฐ UIImage ๊ตฌํ˜„์„ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€ ๋ Œ๋”๋ง์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ์ง€๋งŒ ์˜ฌ๋ฐ”๋ฅธ ์ˆ˜์ •์ธ์ง€ ํ™•์‹ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

https://github.com/facebook/react-native/blob/1c634a921887caf02f1b9fba6fd177c352f9ef78/Libraries/Image/RCTUIImageViewAnimated.m#L283 -L289

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

๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ์‚ฌ ํ•ด์š”! ๋˜ํ•œ npx patch-package (์ž์„ธํ•œ ์ •๋ณด๋Š” ์—ฌ๊ธฐ )๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ด ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ ํ•ญ์ƒ node_modules๊ฐ€ ๋‹ค์‹œ ์„ค์น˜๋˜๋Š” ๊ฒƒ์„ ์ˆ˜์ •ํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

์ด๊ฒƒ๋“ค์€ ๋‚ด๊ฐ€ ๋‹ค๋ฅธ ์‚ฌ์—…์„ ์‹œ์ž‘ํ•˜๊ณ  ํ”„๋กœ๊ทธ๋ž˜๋จธ๊ฐ€ ๋˜๋Š” ๊ฒƒ์„ ๊ทธ๋งŒ๋‘๊ณ  ์‹ถ๊ฒŒ ๋งŒ๋“œ๋Š” ์ข…๋ฅ˜์˜ ๋ฒ„๊ทธ์ž…๋‹ˆ๋‹ค.

https://github.com/huylvdev/react-native-fix-image ๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค

์ •๋ง ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ํ•˜๋ฃจ๋ฅผ ๋ณด๋‚ธ ํ›„ ๋งˆ์นจ๋‚ด์ด ๋„์›€์œผ๋กœ ํ•ด๊ฒฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์ด๋ฒˆ ํŒจ์น˜๊ฐ€ 0.63.2 ๋ฒ„์ „์—๋„ ์ ์šฉ๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํŒŒ์ผ ์ด๋ฆ„์„ (react-native+0.62.2.patch)๋กœ ๋ฐ”๊ฟ‰๋‹ˆ๋‹ค.

์ด ๋ฌธ์ œ๋ฅผ ๋‹ค์‹œ ์—ฌ์‹ญ์‹œ์˜ค.
์ด๊ฒƒ์€ ์—ฌ์ „ํžˆ โ€‹โ€‹โ€‹โ€‹๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์ง€ ๋ชปํ•ฉ๋‹ˆ๋‹ค.

https://github.com/huylvdev/react-native-fix-image ๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค

์ •๋ง ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ํ•˜๋ฃจ๋ฅผ ๋ณด๋‚ธ ํ›„ ๋งˆ์นจ๋‚ด์ด ๋„์›€์œผ๋กœ ํ•ด๊ฒฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์ด๋ด, ๋‚˜๋Š” react-native-fix-image ๋ฅผ ์‚ฌ์šฉํ•ด ๋ณด์•˜๊ณ  ๋‚ด๊ฐ€ ํ•  ๋•Œ ํšจ๊ณผ๊ฐ€ ์žˆ์—ˆ๋‹ค.
npx react-native-fix-image ํ•˜์ง€๋งŒ node_modules๋ฅผ ์ œ๊ฑฐํ•˜๊ณ  ๋‹ค์‹œ ์„ค์น˜ํ•  ๋•Œ.
์•ฑ์€ ์ด๋ฏธ์ง€๋ฅผ ๋กœ๋“œํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
๊ทธ๋Ÿฌํ•œ ๋ฌธ์ œ์— ์ง๋ฉดํ–ˆ์œผ๋ฉฐ ์ด๋ฏธ์ง€๋ฅผ ๋ Œ๋”๋งํ•˜๊ธฐ ์œ„ํ•ด ๋งค๋ฒˆ npx ๋ช…๋ น์„ ์‹คํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๊นŒ?

์—ฌ๊ธฐ ๋‹น์‹ ์ด ๊ฐ„๋‹ค
https://github.com/facebook/react-native/issues/29279#issuecomment -658244428

https://github.com/huylvdev/react-native-fix-image ๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค

์ •๋ง ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ํ•˜๋ฃจ๋ฅผ ๋ณด๋‚ธ ํ›„ ๋งˆ์นจ๋‚ด์ด ๋„์›€์œผ๋กœ ํ•ด๊ฒฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค! ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!!

๋ฆด๋ฆฌ์Šค ๋ชจ๋“œ์—์„œ๋Š” ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

@tomcheung ์ •๋ง ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!
๋ฌธ์ œ๊ฐ€ ๋ญ”์ง€ ์•Œ์•„๋‚ด๋ ค๊ณ  2์ผ๋™์•ˆ ๋จธ๋ฆฌ๋ฅผ ๋ถ€๋”ช์ณค๋Š”๋ฐ...

์ด์ „ ๋ฒ„์ „์˜ React Native(์˜ˆ: 0.60.6)๋ฅผ ์‹คํ–‰ํ•˜๋Š” ์‚ฌ์šฉ์ž์˜ ๊ฒฝ์šฐ RCTUIImageViewAnimated.m ํŒŒ์ผ์ด ์กด์žฌํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ํŒจ์น˜๊ฐ€ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. React Native Fast Image v8.1.5๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  SDWebImage ํฌ๋“œ๋ฅผ pod update SDWebImage ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜์—ฌ ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค. ๋” ๊ตฌ์ฒด์ ์œผ๋กœ ๋งํ•˜๋ฉด SDWebImage๋ฅผ v5.8.1์—์„œ v5.9.2๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ–ˆ์Šต๋‹ˆ๋‹ค.

์ถœ์ฒ˜: https://github.com/DylanVann/react-native-fast-image/issues/702#issuecomment -653930858

๋ฆด๋ฆฌ์Šค ๋ฒ„์ „์—์„œ ์ด๋ฏธ์ง€๊ฐ€ ํ‘œ์‹œ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. (์—‘์Šคํฌ 39 ํ”„๋กœ์ ํŠธ ์ œ์™ธ) RN 0.63.3
์—…๋ฐ์ดํŠธ: metro.config.js ์—…๋ฐ์ดํŠธ๋กœ ๋‚ด ๋ฌธ์ œ ํ•ด๊ฒฐ => https://forums.expo.io/t/assets-missing-only-in-ios-release-build-after-ejecting/42759

์ด๊ฒƒ์€ ๋ชจ๋“  RN ๋ฆด๋ฆฌ์Šค์—์„œ ๊ณต์‹์ ์œผ๋กœ ์ˆ˜์ •๋  ์˜ˆ์ •์ž…๋‹ˆ๊นŒ? Afaik, ๋ฌธ์ œ๋Š” ์—ฌ์ „ํžˆ ์žˆ์Šต๋‹ˆ๋‹ค.

์ด๊ฒƒ์€ ๋ชจ๋“  RN ๋ฆด๋ฆฌ์Šค์—์„œ ๊ณต์‹์ ์œผ๋กœ ์ˆ˜์ •๋  ์˜ˆ์ •์ž…๋‹ˆ๊นŒ? Afaik, ๋ฌธ์ œ๋Š” ์—ฌ์ „ํžˆ ์žˆ์Šต๋‹ˆ๋‹ค.

+1. ๊ฐ€๋”์€ ์˜ˆ์ „ ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๊ณ  ์žˆ์–ด์„œ ํŒจ์น˜๋ฅผ ํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

diff --git a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.mb/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
์ƒ‰์ธ 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 *)๋ ˆ์ด์–ด
    {

    • if (!_currentFrame) {

    • _currentFrame = self.image;

    • }

      if (_currentFrame) {

      layer.contentsScale = self.animatedImageScale;

      layer.contents = (__๋ธŒ๋ฆฟ์ง€ ์•„์ด๋””)_currentFrame.CGImage;

      diff --git a/node_modules/react-native/scripts/.packager.env b/node_modules/react-native/scripts/.packager.env

      ์ƒˆ ํŒŒ์ผ ๋ชจ๋“œ 100644

      ์ธ๋ฑ์Šค 0000000..361f5fb

      --- /dev/null

      +++ b/node_modules/react-native/scripts/.packager.env

      @@ -0,0 +1 @@

      +์ˆ˜์ถœ RCT_METRO_PORT=8081

๊ฐ์‚ฌ ํ•ด์š”! ์ด๊ฒƒ์€ ์ œ ๋ชจ๋“  ์˜ค๋ž˜๋œ RN ํ”„๋กœ์ ํŠธ์—์„œ ์ €์—๊ฒŒ ํšจ๊ณผ์ ์ด์—ˆ์Šต๋‹ˆ๋‹ค.
react-native+0.63.0.patch ํŒŒ์ผ์„ ๋งŒ๋“ค๊ธฐ ์ „์— 0.63 ๋Œ€์‹  ์ด์ „ ํ”„๋กœ์ ํŠธ์˜ React Native ๋ฒ„์ „์„ ๋ฐ”๊พธ์„ธ์š”.

๋‚˜๋Š” ๋น„๋””์˜ค ๋ฅผ ๋งŒ๋“ค์—ˆ์œผ๋ฉฐ ์ด๊ฒƒ์ด ๋ˆ„๊ตฐ๊ฐ€์—๊ฒŒ ๋„์›€์ด๋˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.

@AsbarAli ์˜ ์ˆ˜์ • ์‚ฌํ•ญ์ด ์ €์—๊ฒŒ ํšจ๊ณผ์ ์ด์—ˆ์Šต๋‹ˆ๋‹ค. RN ๋ฒ„์ „: 0.61.5.

_currentFrame์ด nil์ธ ๊ฒฝ์šฐ [super displayLayer:layer]; ๋ฅผ ์ถ”๊ฐ€ํ•œ ํ›„ ์ด๋ฏธ์ง€๋ฅผ ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๋‚ด๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ดํ•ดํ•œ๋‹ค๋ฉด _currentFrame์€ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ด๋ฏธ์ง€์šฉ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์Šคํ‹ธ ์ด๋ฏธ์ง€์ธ ๊ฒฝ์šฐ UIImage ๊ตฌํ˜„์„ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€ ๋ Œ๋”๋ง์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ์ง€๋งŒ ์˜ฌ๋ฐ”๋ฅธ ์ˆ˜์ •์ธ์ง€ ํ™•์‹ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
https://github.com/facebook/react-native/blob/1c634a921887caf02f1b9fba6fd177c352f9ef78/Libraries/Image/RCTUIImageViewAnimated.m#L283 -L289

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

๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ์‚ฌ ํ•ด์š”! ๋˜ํ•œ npx patch-package (์ž์„ธํ•œ ์ •๋ณด๋Š” ์—ฌ๊ธฐ )๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ด ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ ํ•ญ์ƒ node_modules๊ฐ€ ๋‹ค์‹œ ์„ค์น˜๋˜๋Š” ๊ฒƒ์„ ์ˆ˜์ •ํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

์ด๊ฒƒ๋“ค์€ ๋‚ด๊ฐ€ ๋‹ค๋ฅธ ์‚ฌ์—…์„ ์‹œ์ž‘ํ•˜๊ณ  ํ”„๋กœ๊ทธ๋ž˜๋จธ๊ฐ€ ๋˜๋Š” ๊ฒƒ์„ ๊ทธ๋งŒ๋‘๊ณ  ์‹ถ๊ฒŒ ๋งŒ๋“œ๋Š” ์ข…๋ฅ˜์˜ ๋ฒ„๊ทธ์ž…๋‹ˆ๋‹ค.

ํŒจ์น˜๋ฅผ ์ ์šฉํ•˜๋ ค๋ฉด npx patch-package react-native ๋ฅผ ์‹คํ–‰ํ•˜๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค.

์ด๋ด, ๋ˆ„๊ตฐ๊ฐ€ ์ด๊ฒƒ์ด ์ฝ”์–ด์— ๋ณ‘ํ•ฉ๋˜์—ˆ์Œ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๊นŒ?

ํŒจ์น˜ ํŒจํ‚ค์ง€๋Š” ์†”๋ฃจ์…˜์ด์ง€๋งŒ ์˜๊ตฌ์ ์ด์–ด์„œ๋Š” ์•ˆ ๋ฉ๋‹ˆ๋‹ค.

์กฐ์‚ฌํ•  ์ˆ˜ ์žˆ์„ ๋•Œ๊นŒ์ง€ ์ด ๋‚ด์šฉ์„ ๊ณต๊ฐœํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

๊ทธ๋“ค์€ ์ด๊ฒƒ์„ ๊ณ ์น  ๊ณ„ํš์ด ์—†์Šต๋‹ˆ๊นŒ?

https://www.npmjs.com/package/react-native-fix-image
๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ•˜๋Š”

๊ทธ๊ฒƒ์€ ๊ณ ์ • ๋œ ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์ž…๋‹ˆ๋‹ค. ์ด์ „ ๋ฒ„์ „์œผ๋กœ ๋‹ค์‹œ ์ด์‹๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์ˆ˜์ • ์‚ฌํ•ญ์ด 63.3์— ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.

@AsbarAli ์˜ ์ˆ˜์ • ์‚ฌํ•ญ์ด ์ €์—๊ฒŒ ํšจ๊ณผ์ ์ด์—ˆ์Šต๋‹ˆ๋‹ค. RN ๋ฒ„์ „: 0.61.5.

์–ด๋–ป๊ฒŒ ํ–ˆ์–ด? RN 61.2๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

react-native+0.63.0.patch ์‚ฌ์šฉ

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.- "npm i -g patch-package" ์‹คํ–‰
2.- ํŒจ์น˜๋ผ๋Š” ์ƒˆ ํด๋”๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
3.- ํ•ด๋‹น ํด๋” ์•ˆ์— react-native+0.63.0.patch๋ผ๋Š” ์ƒˆ ํŒŒ์ผ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
4.- ์œ„์˜ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
5.- ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ์—์„œ "patch-package" ์‹คํ–‰

RN v0.61.2๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋™์•ˆ ์ด ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ์ง€๋งŒ ์—ฌ์ „ํžˆ ํšจ๊ณผ๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ์‚ฌ ํ•ด์š”

์•ˆ๋…•ํ•˜์„ธ์š”, ๋„์™€๋“œ๋ฆด๊นŒ์š”? ๋‚˜๋Š” ๋˜ํ•œ RN 61.2๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์ง€๋งŒ ์ „ํ˜€ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ํ•˜๋‹จ ํƒ์ƒ‰ ์ด๋ฏธ์ง€๊ฐ€ ํ‘œ์‹œ๋˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ์Œ

@rjtubera๋‹˜ , ํŒจ์น˜๋Š” 0.63์—์„œ ์ž‘๋™ํ•ด์•ผ ํ•˜์ง€๋งŒ 0.61.5 ๋ฒ„์ „์˜ React Native์—์„œ๋„ ์ž‘๋™ํ•œ๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ์•„๋งˆ๋„ React Native 0.61.2์—์„œ 0.61.5๋กœ ์—…๊ทธ๋ ˆ์ด๋“œ๋ฅผ ์‹œ๋„ํ•˜๊ณ  ์ธ์šฉํ•œ ๋‹จ๊ณ„๋ฅผ ๋‹ค์‹œ ์ ์šฉํ•˜๋ฉด ์ž‘๋™ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ทธ๋ž˜๋„ ์ž‘๋™ํ•˜์ง€ ์•Š์œผ๋ฉด 0.63์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๊ณ  ๋™์ผํ•˜๊ฒŒ ์ˆ˜ํ–‰ํ•˜์‹ญ์‹œ์˜ค. ์ผ๋ถ€ ๊ตฌ์„ฑ ์š”์†Œ๊ฐ€ ํŒŒ์†๋  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ ์กฐ์‹ฌํ•˜์‹ญ์‹œ์˜ค. ์—…๊ทธ๋ ˆ์ด๋“œ ํ›„ ๋ชจ๋“  ๊ตฌ์„ฑ ์š”์†Œ๋ฅผ ํ…Œ์ŠคํŠธํ•˜์—ฌ ๋ชจ๋“  ๊ฒƒ์ด ์—ฌ์ „ํžˆ ์ž˜ ์ž‘๋™ํ•˜๋Š”์ง€ ํ™•์ธํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค(iOS ๋ฐ Android์—์„œ).

์ด ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด ์ด ๋งํฌ์˜ ๋‹จ๊ณ„์— ๋”ฐ๋ผ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.
https://github.com/facebook/react-native/pull/29420#issuecomment -707435412

Alabi์—๊ฒŒ ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค. React Native๋ฅผ ํŒจ์น˜ํ•˜์—ฌ ๋ฌธ์ œ๋„ ๋ถ„๋ฅ˜ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ง€๊ธˆ๊นŒ์ง€ ์ž˜์“ฐ๊ณ ์žˆ์Šต๋‹ˆ๋‹ค๐Ÿ˜Š

๋ณด๋‚ธ ์‚ฌ๋žŒ: Alabi Temitope Wahab [email protected]
๋‹ต์žฅ: facebook/react-native [email protected]
๋‚ ์งœ: 2020๋…„ 10์›” 13์ผ ํ™”์š”์ผ 03:56
๋ฐ›๋Š” ์‚ฌ๋žŒ: facebook/react-native [email protected]
์ฐธ์กฐ: Kieran Desmond [email protected] , [email protected] ๋Œ“๊ธ€
์ œ๋ชฉ: Re: [facebook/react-native] iOS 14(#29279)์—์„œ ์ด๋ฏธ์ง€๊ฐ€ ์ด๋ฏธ์ง€๋ฅผ ํ‘œ์‹œํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

์ด ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด ์ด ๋งํฌ์˜ ๋‹จ๊ณ„์— ๋”ฐ๋ผ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.

29420 (๋Œ“๊ธ€) https://github.com/facebook/react-native/pull/29420#issuecomment-707435412

โ€”
๋‹น์‹ ์ด ๋Œ“๊ธ€์„ ๋‹ฌ์•˜๊ธฐ ๋•Œ๋ฌธ์— ์ด๊ฒƒ์„ ๋ฐ›๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.
์ด ์ด๋ฉ”์ผ์— ์ง์ ‘ ๋‹ต์žฅํ•˜๊ฑฐ๋‚˜ GitHub https://github.com/facebook/react-native/issues/29279#issuecomment-707436028 ์—์„œ ํ™•์ธํ•˜๊ฑฐ๋‚˜ https://github.com/notifications/unsubscribe-auth/AIENJUWD2RES5AC52CT4MG3SKOXURANCNFSM4ORGDXZA ๊ตฌ๋…์„ ์ทจ์†Œํ•˜์„ธ์š”.

๋‚˜๋Š” ๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ์˜ 0.63 ๋ฒ„์ „์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ–ˆ์ง€๋งŒ ๋™์ผํ•œ ๋ฌธ์ œ์— ์ง๋ฉดํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋ˆ„๊ตฌ๋“ ์ง€ ๋‚˜๋ฅผ ๋„์šธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๊นŒ?

์ด์ „ ๋ฒ„์ „์˜ React Native(์˜ˆ: 0.60.6)๋ฅผ ์‹คํ–‰ํ•˜๋Š” ์‚ฌ์šฉ์ž์˜ ๊ฒฝ์šฐ RCTUIImageViewAnimated.m ํŒŒ์ผ์ด ์กด์žฌํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ํŒจ์น˜๊ฐ€ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. React Native Fast Image v8.1.5๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  SDWebImage ํฌ๋“œ๋ฅผ pod update SDWebImage ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜์—ฌ ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค. ๋” ๊ตฌ์ฒด์ ์œผ๋กœ ๋งํ•˜๋ฉด SDWebImage๋ฅผ v5.8.1์—์„œ v5.9.2๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ–ˆ์Šต๋‹ˆ๋‹ค.

์ถœ์ฒ˜: DylanVann/react-native-fast-image#702(์ฝ”๋ฉ˜ํŠธ)

์™„๋ฒฝํ•˜๊ฒŒ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

react-native-fast-image ๋ฒ„์ „ 8.3.2์—๋Š” SDWebImage์˜ ์—…๊ทธ๋ ˆ์ด๋“œ ๋ฒ„์ „๋„ ํฌํ•จ๋˜์–ด ์žˆ์œผ๋ฏ€๋กœ pod update ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค!

https://www.npmjs.com/package/react-native-fix-image
๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ•˜๋Š”

๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ๋‹ค. ๐Ÿ‘

React-Native 0.63.1์—์„œ 0.63.2๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๋Š” ๊ฒƒ์ด ๋„์›€์ด ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

Xcode 12.0.1. ๋ฐ ios 14 ์˜ RN 0.62.2 ์—์„œ ๋™์ผํ•œ ๋ฌธ์ œ์— ์ง๋ฉดํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์–ด๋–ค ํ•ด๊ฒฐ์ฑ…์ด ์žˆ์Šต๋‹ˆ๊นŒ?

Xcode 12.0.1. ๋ฐ ios 14 ์˜ RN 0.62.2 ์—์„œ ๋™์ผํ•œ ๋ฌธ์ œ์— ์ง๋ฉดํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์–ด๋–ค ํ•ด๊ฒฐ์ฑ…์ด ์žˆ์Šต๋‹ˆ๊นŒ?

@ghasemikasra39 ๋™์ผํ•œ ๋ฒ„์ „์—์„œ ๋™์ผํ•œ ๋ฌธ์ œ์— ์ง๋ฉดํ–ˆ์Šต๋‹ˆ๋‹ค. react-native-fix-image ์„ค์น˜๊ฐ€ ์ €์—๊ฒŒ ํšจ๊ณผ์ ์ด์—ˆ์Šต๋‹ˆ๋‹ค.

@RutsSantos ๋Š” ์ด๊ฒƒ์— ๋Œ€ํ•ด์„œ๋„ ์ €์—๊ฒŒ ํšจ๊ณผ์ ์ด์—ˆ์Šต๋‹ˆ๋‹ค!

1) npm install --save react-native-fix-image
2) npx ๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ ์ˆ˜์ • ์ด๋ฏธ์ง€
3) ํ”„๋กœ์ ํŠธ ์žฌ๊ตฌ์ถ•

React-Native 0.63.1์—์„œ 0.63.2๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๋Š” ๊ฒƒ์ด ๋„์›€์ด ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์ด๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ์Šต๋‹ˆ๋‹ค.

์ด๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ์Šต๋‹ˆ๋‹ค. @JordanRosas ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค

@JordanRosas ๋„ ํ›Œ๋ฅญํ•˜๊ฒŒ ์ž‘์—…ํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ ๋ฒ„์ „์„ 0.62.2์—์„œ 0.63.3์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๋ฉด ๋” ์ด์ƒ npm ๋ชจ๋“ˆ์„ ํŒจ์น˜ํ•˜๊ฑฐ๋‚˜ ์„ค์น˜ํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

0.62.3์ด ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค:

0.63.3
0.63.2
0.63.1
0.63.0
0.63.0-rc.1
0.63.0-rc.0
โฏ 0.62.2
0.62.1
0.62.0

0.63.3
0.63.2
0.63.1
0.63.0
0.63.0-rc.1
0.63.0-rc.0
โฏ 0.62.2
0.62.1
0.62.0

์ˆ˜์ •

์šฐ๋ฆฌ ์ค‘ ์ผ๋ถ€๋Š” ์ด ์ค‘์š”ํ•œ RN ๋ฒ„๊ทธ๊ฐ€ ํ•ด๊ฒฐ๋  ๋•Œ๊นŒ์ง€ ์—…๊ทธ๋ ˆ์ด๋“œํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค: https://github.com/facebook/react-native/issues/29451

๊ทธ๋ž˜์„œ ์šฐ๋ฆฌ๋Š” ์›์ˆญ์ด ํŒจ์น˜ 0.62.x ๋˜๋Š” ๋ฒ„๊ทธ๊ฐ€ ์žˆ๋Š” 0.63.x ๋ฒ„์ „์— ๊ฐ‡ํ˜€ ์žˆ์Šต๋‹ˆ๋‹ค.

_currentFrame์ด nil์ธ ๊ฒฝ์šฐ [super displayLayer:layer]; ๋ฅผ ์ถ”๊ฐ€ํ•œ ํ›„ ์ด๋ฏธ์ง€๋ฅผ ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‚ด๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ดํ•ดํ•œ๋‹ค๋ฉด _currentFrame์€ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ด๋ฏธ์ง€์šฉ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์Šคํ‹ธ ์ด๋ฏธ์ง€์ธ ๊ฒฝ์šฐ UIImage ๊ตฌํ˜„์„ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€ ๋ Œ๋”๋ง์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ์ง€๋งŒ ์˜ฌ๋ฐ”๋ฅธ ์ˆ˜์ •์ธ์ง€ ํ™•์‹ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

https://github.com/facebook/react-native/blob/1c634a921887caf02f1b9fba6fd177c352f9ef78/Libraries/Image/RCTUIImageViewAnimated.m#L283 -L289

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

ํšจ๊ณผ๊ฐ€์žˆ๋‹ค. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•˜๊ฑฐ๋‚˜ node_modules ๋ฅผ ์ง์ ‘ ํŽธ์ง‘ํ•˜์ง€ ์•Š์œผ๋ ค๋ฉด https://stackoverflow.com/a/64495360/7477198 ์—์„œ์™€ ๊ฐ™์ด podfile์— preinstall ์Šคํ…Œ์ด์ง€ ํ›„ํฌ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ๋‹ค. ์ด๊ฒƒ์€ ์ž์‹์—๊ฒŒ ๋” ์นœ์ˆ™ํ•ฉ๋‹ˆ๋‹ค.

์ €์—๊ฒŒ๋Š” RN 63.3์—์„œ๋„ ๋ฌผ๋ฆฌ์  ์žฅ์น˜์— ์ด๋ฏธ์ง€๊ฐ€ ํ‘œ์‹œ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์œผ๋กœ https://www.base64-image.de/ ์—์„œ base 64๋กœ ์ด๋ฏธ์ง€๋ฅผ ์ธ์ฝ”๋”ฉํ•œ ๋‹ค์Œ $# ๋Œ€์‹  Image ๊ตฌ์„ฑ ์š”์†Œ์— ๋Œ€ํ•œ source ๋กœ ์‚ฌ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค require('imagePath')

_currentFrame์ด nil์ธ ๊ฒฝ์šฐ [super displayLayer:layer]; ๋ฅผ ์ถ”๊ฐ€ํ•œ ํ›„ ์ด๋ฏธ์ง€๋ฅผ ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‚ด๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ดํ•ดํ•œ๋‹ค๋ฉด _currentFrame์€ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ด๋ฏธ์ง€์šฉ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์Šคํ‹ธ ์ด๋ฏธ์ง€์ธ ๊ฒฝ์šฐ UIImage ๊ตฌํ˜„์„ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€ ๋ Œ๋”๋ง์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ์ง€๋งŒ ์˜ฌ๋ฐ”๋ฅธ ์ˆ˜์ •์ธ์ง€ ํ™•์‹ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

https://github.com/facebook/react-native/blob/1c634a921887caf02f1b9fba6fd177c352f9ef78/Libraries/Image/RCTUIImageViewAnimated.m#L283 -L289

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

๋‹น์‹ ์€ ์ฒœ์žฌ์ž…๋‹ˆ๋‹ค, ๋‹น์‹ ์€ ๋‚ด ์ƒ๋ช…์„ ๊ตฌํ–ˆ์Šต๋‹ˆ๋‹ค!

react-native+0.63.0.patch ์‚ฌ์šฉ

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.- "npm i -g patch-package" ์‹คํ–‰
2.- ํŒจ์น˜๋ผ๋Š” ์ƒˆ ํด๋”๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
3.- ํ•ด๋‹น ํด๋” ์•ˆ์— react-native+0.63.0.patch๋ผ๋Š” ์ƒˆ ํŒŒ์ผ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
4.- ์œ„์˜ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
5.- ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ์—์„œ "patch-package" ์‹คํ–‰

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค
RN 0.61.5์—์„œ ์ž˜ ์ž‘๋™ํ–ˆ์Šต๋‹ˆ๋‹ค.
react-native+0.61.5.patch ๋ผ๋Š” ํŒจ์น˜ ํŒŒ์ผ์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.

๋˜ํ•œ DylanVann/react-native-fast-image์— ๋Œ€ํ•œ ์ˆ˜์ • ์‚ฌํ•ญ
cd ios && pod update SDWebImage

react-native+0.63.0.patch ์‚ฌ์šฉ

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

@legion-zver ์ˆ˜์ •ํ•ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! ์—ฌ๊ธฐ์— RCT_METRO_PORT๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๊นŒ, ์•„๋‹ˆ๋ฉด ํ”„๋กœ์ ํŠธ์— ํŠน์ •ํ•œ ๊ฒƒ์ด ํ•„์š”ํ•ฉ๋‹ˆ๊นŒ?

Xcode 12.0.1์˜ RN 0.59.0. ๋ฐ ios 14. ์†”๋ฃจ์…˜์ด ์žˆ์Šต๋‹ˆ๊นŒ?

Xcode 12.0.1์˜ RN 0.59.0. ๋ฐ ios 14. ์†”๋ฃจ์…˜์ด ์žˆ์Šต๋‹ˆ๊นŒ?

3๊ฐ€์ง€ ์†”๋ฃจ์…˜:

  1. node_modules ๋‚ด์—์„œ ์ˆ˜๋™์œผ๋กœ ๋ฌธ์ œ ์ˆ˜์ •
  2. ์ด ์ˆ˜์ • ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์‹ญ์‹œ์˜ค. https://www.npmjs.com/package/react-native-fix-image
  3. React Native 0.63.3 ์—…๋ฐ์ดํŠธ

"react-native": "0.63.3" ์—์„œ๋„ --configuration=Release ์— ์ด๊ฒƒ์ด ์—ฌ์ „ํžˆ ์กด์žฌํ•จ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ --configuration=Debug ์—์„œ๋Š” ์ž˜ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

https://www.npmjs.com/package/react-native-fix-image ๋Š” ๋„์›€์ด ๋˜์ง€ ์•Š์ง€๋งŒ ๋นŒ๋“œ๋ฅผ ์ค‘๋‹จํ•ฉ๋‹ˆ๋‹ค.
์ด ์˜ค๋ฅ˜๊ฐ€ ์žˆ๋Š” ๋ฆด๋ฆฌ์Šค ๊ตฌ์„ฑ:

.../node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m:278:5: error: expected expression
  } else {
    ^

๋˜ํ•œ ๋‚ด ์•ฑ ์‚ฌ์šฉ์ž๋Š” iOS์—์„œ (URL์—์„œ) ์ด๋ฏธ์ง€ ๋กœ๋“œ๋ฅผ ๊ฒฝํ—˜ํ•˜์ง€ ์•Š์ง€๋งŒ ๋ชจ๋“  ์‚ฌ๋žŒ์—๊ฒŒ ์ผ๋ถ€ ์‚ฌ๋žŒ๋“ค์—๊ฒŒ๋งŒ ๋ฐœ์ƒํ•˜์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค. ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์„ธ์š”. ๋‚˜๋Š” React Native 0.63.3์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
https://i.ibb.co/1vDc6kv/1.jpg <- ์ด ๋ฌธ์ œ๋ฅผ ๋ณด์—ฌ์ฃผ๋Š” ์ด๋ฏธ์ง€ ๋งํฌ

@douglasjunior ๋Š” ์ž˜ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค! ๋งค์šฐ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

@RutsSantos ๋Š” ์ด๊ฒƒ์— ๋Œ€ํ•ด์„œ๋„ ์ €์—๊ฒŒ ํšจ๊ณผ์ ์ด์—ˆ์Šต๋‹ˆ๋‹ค!

  1. npm install --react-native-fix-image ์ €์žฅ
  2. npx ๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ ์ˆ˜์ • ์ด๋ฏธ์ง€
  3. ์žฌ๊ฑด ํ”„๋กœ์ ํŠธ

๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ๋‹ค ๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰

Xcode 12.0.1์˜ RN 0.59.0. ๋ฐ ios 14. ์†”๋ฃจ์…˜์ด ์žˆ์Šต๋‹ˆ๊นŒ?

3๊ฐ€์ง€ ์†”๋ฃจ์…˜:

  1. node_modules ๋‚ด์—์„œ ์ˆ˜๋™์œผ๋กœ ๋ฌธ์ œ ์ˆ˜์ •
  2. ์ด ์ˆ˜์ • ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์‹ญ์‹œ์˜ค. https://www.npmjs.com/package/react-native-fix-image
  3. React Native 0.63.3 ์—…๋ฐ์ดํŠธ

๋˜ ๋‹ค๋ฅธ Q, node_modules ๋‚ด์—์„œ ์ˆ˜๋™์œผ๋กœ .1์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ๋„คํŠธ์›Œํฌ์˜ ์ด๋ฏธ์ง€ ํ‘œ์‹œ์—์„œ๋Š” ์ž˜ ์ž‘๋™ํ•˜์ง€๋งŒ ๋กœ์ปฌ ์ด๋ฏธ์ง€๋Š” ํ‘œ์‹œํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

๋˜ํ•œ ๋‚ด ์•ฑ ์‚ฌ์šฉ์ž๋Š” iOS์—์„œ (URL์—์„œ) ์ด๋ฏธ์ง€ ๋กœ๋“œ๋ฅผ ๊ฒฝํ—˜ํ•˜์ง€ ์•Š์ง€๋งŒ ๋ชจ๋“  ์‚ฌ๋žŒ์—๊ฒŒ ์ผ๋ถ€ ์‚ฌ๋žŒ๋“ค์—๊ฒŒ๋งŒ ๋ฐœ์ƒํ•˜์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค. ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์„ธ์š”. ๋‚˜๋Š” React Native 0.63.3์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
https://i.ibb.co/1vDc6kv/1.jpg <- ์ด ๋ฌธ์ œ๋ฅผ ๋ณด์—ฌ์ฃผ๋Š” ์ด๋ฏธ์ง€ ๋งํฌ

๋‚˜์—๊ฒŒ ๋ฐœ์ƒํ•œ ๋ฌธ์ œ๋ฅผ ์ฐพ์Šต๋‹ˆ๋‹ค. WebP๋Š” iOS 13์—์„œ ์ง€์›๋˜์ง€ ์•Š์œผ๋ฏ€๋กœ SDWebImageWebPCoder ํฌ๋“œ๋กœ react-native-fast-image๋ฅผ ์„ค์น˜ํ•ด์•ผ ํ–ˆ์Šต๋‹ˆ๋‹ค.

์•„๋ฌด๋„ ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•œ Microsoft App Center ๋นŒ๋“œ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ•˜์ง€ ์•Š์Šต๋‹ˆ๊นŒ?

์ฐธ๊ณ ๋กœ ์ €๋Š” SDWebImage https://github.com/DylanVann/react-native-fast-image/issues/730 ์„ ์—…๊ทธ๋ ˆ์ด๋“œํ•œ ํ›„ ์ˆ˜์ •๋œ FastImage ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ด ๋ฌธ์ œ๋ฅผ ๊ทน๋ณตํ•  ์ˆ˜๋„ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ๋‹ค๋ฅธ ์ž‘์—…์€ ๊ฒฐ๊ตญ ์ตœ์‹  ๋ฒ„์ „์œผ๋กœ ์ด๋™)

์ œ ๊ฒฝ์šฐ์—๋Š” ์ผ๋ฐ˜ RN์˜ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ด๋ฏธ์ง€๊ฐ€ ์žˆ์—ˆ์ง€๋งŒ ๋‹ค์Œ์„ ์‚ฌ์šฉํ•˜์—ฌ FastImage๋„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

const AnimatedImage = Animated.createAnimatedComponent(FastImage)

<AnimatedImage source={require('....')} />

๋˜๋Š” ์ˆ˜์ • ์ด๋ฏธ์ง€ ํŒจํ‚ค์ง€๊ฐ€ ์ˆ˜ํ–‰ํ•ด์•ผ ํ•˜๋ฉฐ, Appcenter(@krisbaum74)์—์„œ ์ž‘๋™ํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ repo์˜ ๋ฃจํŠธ์— appcenter-pre-build.sh ๋ฅผ ๋งŒ๋“ค๊ณ  ์ˆ˜์ • ์‚ฌํ•ญ์ด ํฌํ•จ๋œ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ๋™์ผํ•œ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๊ฑฐ๊ธฐ

๋‚˜๋Š” react-native 0.63.3์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์œผ๋ฉฐ ์—ฌ์ „ํžˆ iOS 14.1์—์„œ ์ด ๋ฌธ์ œ์— ์ง๋ฉดํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฒ„์ „์— ์ด๋ฏธ ์ ์šฉ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ์•„์ด๋””์–ด๊ฐ€ ์žˆ์Šต๋‹ˆ๊นŒ?

๋‚˜๋Š” react-native 0.63.3์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์œผ๋ฉฐ ์—ฌ์ „ํžˆ iOS 14.1์—์„œ ์ด ๋ฌธ์ œ์— ์ง๋ฉดํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฒ„์ „์— ์ด๋ฏธ ์ ์šฉ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ์•„์ด๋””์–ด๊ฐ€ ์žˆ์Šต๋‹ˆ๊นŒ?

0.63.3์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๋ฉด ํ•ด๋‹น ์ฝ”๋“œ์— ๋ฌธ์ œ๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์ˆ˜์ • ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ https://www.npmjs.com/package/react-native-fix-image ๋ฅผ ์‚ฌ์šฉํ•ด ๋ณด์„ธ์š”.

๋‚˜๋Š” react-native 0.63.3์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์œผ๋ฉฐ ์—ฌ์ „ํžˆ iOS 14.1์—์„œ ์ด ๋ฌธ์ œ์— ์ง๋ฉดํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฒ„์ „์— ์ด๋ฏธ ์ ์šฉ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ์•„์ด๋””์–ด๊ฐ€ ์žˆ์Šต๋‹ˆ๊นŒ?

0.63.3์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๋ฉด ํ•ด๋‹น ์ฝ”๋“œ์— ๋ฌธ์ œ๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์ˆ˜์ • ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ https://www.npmjs.com/package/react-native-fix-image ๋ฅผ ์‚ฌ์šฉํ•ด ๋ณด์„ธ์š”.

์ด๋ฏธ 0.63.3์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ–ˆ๋Š”๋ฐ ์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์ง€ ๋ชปํ•ฉ๋‹ˆ๋‹ค(์ด๋ฏธ์ง€๋Š” ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ์— ๋กœ๋“œ๋˜์ง€๋งŒ ๋ฌผ๋ฆฌ์  ์žฅ์น˜์—๋Š” ๋กœ๋“œ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

๋‚˜๋Š” react-native 0.63.3์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์œผ๋ฉฐ ์—ฌ์ „ํžˆ iOS 14.1์—์„œ ์ด ๋ฌธ์ œ์— ์ง๋ฉดํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฒ„์ „์— ์ด๋ฏธ ์ ์šฉ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ์•„์ด๋””์–ด๊ฐ€ ์žˆ์Šต๋‹ˆ๊นŒ?

0.63.3์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๋ฉด ํ•ด๋‹น ์ฝ”๋“œ์— ๋ฌธ์ œ๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์ˆ˜์ • ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ https://www.npmjs.com/package/react-native-fix-image ๋ฅผ ์‚ฌ์šฉํ•ด ๋ณด์„ธ์š”.

์ด๋ฏธ 0.63.3์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ–ˆ๋Š”๋ฐ ์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์ง€ ๋ชปํ•ฉ๋‹ˆ๋‹ค(์ด๋ฏธ์ง€๋Š” ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ์— ๋กœ๋“œ๋˜์ง€๋งŒ ๋ฌผ๋ฆฌ์  ์žฅ์น˜์—๋Š” ๋กœ๋“œ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

๋‚ด ๋ฌธ์ œ๋Š” ํ”„๋กœ๋•์…˜ ๋นŒ๋“œ์˜ ์ž์‚ฐ ๋ณต์‚ฌ์™€ ๊ด€๋ จ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์—ฌ๊ธฐ ์— ์„ค๋ช…๋œ ๋Œ€๋กœ ์ž˜๋ชป๋œ ์—ฐ๊ฒฐ์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฐ ๋‹ค์Œ ๋ฒˆ๋“ค์„ ์žฌ์ƒ์„ฑํ•˜๊ณ  ๋‹ค์‹œ ์‹œ๋„ํ•˜์‹ญ์‹œ์˜ค.

react-native+0.63.0.patch ์‚ฌ์šฉ

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.- "npm i -g patch-package" ์‹คํ–‰
2.- ํŒจ์น˜๋ผ๋Š” ์ƒˆ ํด๋”๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
3.- ํ•ด๋‹น ํด๋” ์•ˆ์— react-native+0.63.0.patch๋ผ๋Š” ์ƒˆ ํŒŒ์ผ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
4.- ์œ„์˜ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
5.- ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ์—์„œ "patch-package" ์‹คํ–‰

์ •๋ง ๊ณ ๋ง™์Šต๋‹ˆ๋‹ค!!!! ๋‹น์‹ ์€ ๋ง ๊ทธ๋Œ€๋กœ ๋‚ด ํ•˜๋ฃจ๋ฅผ ๊ตฌํ–ˆ์Šต๋‹ˆ๋‹ค ๐Ÿ™ โค๏ธ

_currentFrame์ด nil์ธ ๊ฒฝ์šฐ [super displayLayer:layer]; ๋ฅผ ์ถ”๊ฐ€ํ•œ ํ›„ ์ด๋ฏธ์ง€๋ฅผ ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‚ด๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ดํ•ดํ•œ๋‹ค๋ฉด _currentFrame์€ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ด๋ฏธ์ง€์šฉ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์Šคํ‹ธ ์ด๋ฏธ์ง€์ธ ๊ฒฝ์šฐ UIImage ๊ตฌํ˜„์„ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€ ๋ Œ๋”๋ง์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ์ง€๋งŒ ์˜ฌ๋ฐ”๋ฅธ ์ˆ˜์ •์ธ์ง€ ํ™•์‹ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

https://github.com/facebook/react-native/blob/1c634a921887caf02f1b9fba6fd177c352f9ef78/Libraries/Image/RCTUIImageViewAnimated.m#L283 -L289

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

๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ๋‹ค !!! ๐Ÿ‘

๋˜ํ•œ 0.63.3์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ–ˆ์œผ๋ฉฐ iOS 14์—์„œ ์ด ๋ฌธ์ œ์— ์ง๋ฉดํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
RN-fetch-blob ํŒจํ‚ค์ง€๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŒŒ์ผ(๊ทธ ์ค‘ ์ด๋ฏธ์ง€)์„ ๋‹ค์šด๋กœ๋“œํ•˜๊ณ  Image ๊ตฌ์„ฑ ์š”์†Œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋Ÿฌํ•œ ๋กœ์ปฌ ์ด๋ฏธ์ง€๋ฅผ ๋กœ๋“œํ•ฉ๋‹ˆ๋‹ค.

@krisbaum74

์•„๋ฌด๋„ ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•œ Microsoft App Center ๋นŒ๋“œ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ•˜์ง€ ์•Š์Šต๋‹ˆ๊นŒ?

react-native+0.63.0.patch ์‚ฌ์šฉ

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.- "npm i -g patch-package" ์‹คํ–‰
2.- ํŒจ์น˜๋ผ๋Š” ์ƒˆ ํด๋”๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
3.- ํ•ด๋‹น ํด๋” ์•ˆ์— react-native+0.63.0.patch๋ผ๋Š” ์ƒˆ ํŒŒ์ผ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
4.- ์œ„์˜ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
5.- ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ์—์„œ "patch-package" ์‹คํ–‰

์œ„์˜ ์ˆ˜์ • ์‚ฌํ•ญ์„ ๋”ฐ๋ฅด๊ณ  ํŒŒ์ผ์„ react-native+0.63.0.patch๋กœ ๋งŒ๋“œ์‹ญ์‹œ์˜ค.

๊ทธ ํ›„ appcenter-pre-build.sh์—์„œ ์ถ”๊ฐ€

npm i -g ํŒจ์น˜ ํŒจํ‚ค์ง€
ํŒจ์น˜ ํŒจํ‚ค์ง€

๊ทธ๋Ÿฌ๋ฉด AppCenter ๋นŒ๋“œ์— ์œ„์˜ ์ˆ˜์ • ์‚ฌํ•ญ์ด ์ถ”๊ฐ€๋ฉ๋‹ˆ๋‹ค.

๋‚˜๋Š” iOS์—์„œ ์ด๊ฒƒ์„ ๊ฐ€์ง€๊ณ  ์žˆ์—ˆ๊ณ  ํ›Œ๋ฅญํ•˜๊ฒŒ ์ž‘๋™ํ•˜๋Š” npx react-native-fix-image๋ฅผ ์‚ฌ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด์ œ Android์—์„œ ๋ฌธ์ œ๊ฐ€ ์ง€์†๋œ๋‹ค๋Š” ์‚ฌ์‹ค์— ์‹ค๋งํ–ˆ์Šต๋‹ˆ๋‹ค!

์—ฌ๊ธฐ์— Android์— ๋Œ€ํ•œ ์–ธ๊ธ‰์ด ์—†์Šต๋‹ˆ๋‹ค. ๋‚˜๋งŒ ๊ทธ๋Ÿฐ๊ฐ€์š”?

๋‚˜๋Š” "react-native"๋ฅผ ํ”๋“ค๊ณ  ์žˆ๋‹ค: "0.61.5"

_const ์ด๋ฏธ์ง€ = Animatable.createAnimatableComponent(FastImage);_
์ œ๋Œ€๋กœ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค!

animation={'bounceIn'} ์ด ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค

"๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ": "0.63.3"
"๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ ๋น ๋ฅธ ์ด๋ฏธ์ง€": "^8.3.4"
"๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ ์• ๋‹ˆ๋ฉ”์ด์…˜ ๊ฐ€๋Šฅ": "^1.3.3"

๋‚˜๋Š” ์ด๊ฒƒ์ด 0.63์˜ ํŒจ์น˜๋กœ ๊ฐ„์ฃผ๋œ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ๊ณ  ์žˆ์ง€๋งŒ ์ด๊ฒƒ์ด 0.62์—์„œ๋„ ์ž‘๋™ํ•œ๋‹ค๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๐Ÿ‘

IOS 14.2, Xcode 12.2, react-native 0.63.4์—์„œ๋Š” ์—ฌ์ „ํžˆ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
์ œ์•ˆ๋œ ์ˆ˜์ • ์‚ฌํ•ญ์ด ๋„์›€์ด ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
์—…๋ฐ์ดํŠธ
0.63.4 - ๋ฌธ์ œ๊ฐ€ ์—†๊ณ  ํŒจ์น˜๊ฐ€ ์—†๋Š” ์›๊ฒฉ ์ด๋ฏธ์ง€๋ฅผ ํ‘œ์‹œํ•˜์ง€๋งŒ ๋กœ์ปฌ ์ด๋ฏธ์ง€๋Š” ํŒจ์น˜ ์œ ๋ฌด์— ๊ด€๊ณ„์—†์ด ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

react-native 0.63.3์ด ์žˆ๋Š” ํ”„๋กœ์ ํŠธ๊ฐ€ ์žˆ๋Š”๋ฐ ํŒจ์น˜๊ฐ€ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ํŒจ์น˜๋ฅผ ์ ์šฉํ•˜๊ธฐ ์ „์— RCTUIImageViewAnimated ํด๋ž˜์Šค๋ฅผ ํ™•์ธํ–ˆ์œผ๋ฉฐ ์ด๋ฏธ ํŒจ์น˜ ์ฝ”๋“œ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. #29420์€ ๋ณ€๊ฒฝ ์‚ฌํ•ญ 0.63.2 CHANGELOG https://github.com/react-native-์— ๋”ฐ๋ผ 0.63.3์—์„œ ์ด๋ฏธ ๋ณ‘ํ•ฉ๋˜์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ์˜ˆ์ƒ๋ฉ๋‹ˆ๋‹ค. ์ปค๋ฎค๋‹ˆํ‹ฐ/๋ฆด๋ฆฌ์Šค/blob/master/CHANGELOG.md#v0632. ๊ทธ๋ž˜์„œ ํŒจ์น˜๋Š” ๊ทธ๊ฒƒ์„ ๊ณ ์น  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. 0.62.2์—์„œ๋Š” ์œ ํšจํ•˜๋‹ค๊ณ  ์ƒ๊ฐํ•˜์ง€๋งŒ 0.63.3์—์„œ ๋ณ€๊ฒฝํ•˜๋ฉด _local_ ์ด๋ฏธ์ง€ ๋กœ๋“œ๊ฐ€ ๋‹ค์‹œ ์ค‘๋‹จ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ผ๋ถ€ ๊ฐœ๋ฐœ์ž๊ฐ€ <0.63.2๋กœ ๋‹ค์šด๊ทธ๋ ˆ์ด๋“œํ•˜๊ณ  ํŒจ์น˜๋ฅผ ์ ์šฉํ•˜๋ฉด ์ด๋ฏธ์ง€๊ฐ€ ๋‹ค์‹œ ํ‘œ์‹œ๋˜๋Š” ์ด์œ ๋ฅผ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค. ์ˆ˜์ • ์‚ฌํ•ญ์ด ํฌํ•จ๋œ 0.63.2๋ฅผ ์–ป๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. ์–ด์จŒ๋“ , ๋‚˜๋Š” ๊ณผ๊ฑฐ์— ๊ฐ‡ํžˆ๊ณ  ์‹ถ์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ํ•œ ๋ฒ„์ „์ด๋ผ๋„ ๋‹ค์šด๊ทธ๋ ˆ์ด๋“œํ•˜๋Š” ๊ฒƒ์„ ์ฃผ์ €ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ;-). ๋‚˜๋Š” ๋‚ด ์ชฝ์—์„œ ์ž‘๋™ํ•˜๋Š” ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์„ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค.

_external_ URL(RN 0.63.3)์„ ์‚ฌ์šฉํ•  ๋•Œ _me_ ์ด๋ฏธ์ง€๊ฐ€ ๋กœ๋“œ๋œ๋‹ค๋Š” ์‚ฌ์‹ค์„ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•ฉ๋‹ˆ๋‹ค.
๋‚ด ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•,

  • ๋‚˜๋Š” ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ์ž์‚ฐ ํŒจํ„ด์„ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค. https://reactnative.dev/docs/images#images -from-hybrid-apps-resources์—์„œ ์ฐธ์กฐ๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • iOS/Android ์ž์‚ฐ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์— ์ด๋ฏธ์ง€๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ์Šคํฌ๋ฆฝํŠธ, XCode ๋“ฑ์„ ํ†ตํ•ด ์ˆ˜๋™์œผ๋กœ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • _react ๊ธฐ๋ณธ ํŽธ์˜ ํŒŒ์ผ ์‹œ์Šคํ…œ ์ฐธ์กฐ_ ๋Œ€์‹  _local_ URI๋กœ ์ด๋ฏธ์ง€๋ฅผ ์ฐธ์กฐํ•˜์‹ญ์‹œ์˜ค. ์•„๋ž˜ iOS ์˜ˆ
<Image
  source={{ uri: 'app_icon' }}
  style={{ width: 40, height: 40 }}
/>
  • ํ”Œ๋žซํผ์— ๋”ฐ๋ผ iOS ๋˜๋Š” Android ์ฐธ์กฐ ์ž์‚ฐ URI๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” ์œ ํ‹ธ๋ฆฌํ‹ฐ ํ•จ์ˆ˜๋ฅผ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. ๋ฌธ์„œ(https://reactnative.dev/docs/images#images-from-hybrid-apps-resources)๋ฅผ ์ฝ๊ณ  URI ํ˜•์‹์˜ ์ฐจ์ด์ ์„ ํ™•์ธํ•˜์„ธ์š”.
  • iOS 14.2 ์•ฑ์— ์ด๋ฏธ์ง€๊ฐ€ ํ‘œ์‹œ๋˜๊ธฐ ์‹œ์ž‘ํ–ˆ์Šต๋‹ˆ๋‹ค!! App Store์—์„œ ๋ฐฐํฌํ•œ ์•ฑ๊ณผ Ad Hoc ์„ค์น˜๋กœ ํ…Œ์ŠคํŠธํ–ˆ์Šต๋‹ˆ๋‹ค.

๊ทธ๊ฒƒ์€ (๋‚˜๋ฅผ ์œ„ํ•ด) ์ž‘๋™ํ•˜์ง€๋งŒ, ๋‹จ์ ,

  • React Native ์ฐธ์กฐ ๋ฐฉ์‹์€ ๊ทธ๋ƒฅ ๋‘๊ธฐ์—๋Š” ๋„ˆ๋ฌด ํŽธ๋ฆฌํ•ฉ๋‹ˆ๋‹ค. ์ด ๋ฌธ์ œ๊ฐ€ ํ•ด๊ฒฐ๋˜์–ด ์ •์ƒ์œผ๋กœ ๋Œ์•„๊ฐˆ ์ˆ˜ ์žˆ๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.
  • ์ž ์žฌ์ ์œผ๋กœ 3๊ฐœ์˜ ์ž์‚ฐ ํด๋”๋ฅผ ๋™๊ธฐํ™” ์ƒํƒœ๋กœ ์œ ์ง€... ์˜ˆ, ์Šคํฌ๋ฆฝํŠธ์— ์˜ํ•œ ๊ฒƒ์ด์ง€๋งŒ ๊ฐœ๋ฐœ์ž๋Š” ์‰ฝ๊ฒŒ ์žŠ์–ด๋ฒ„๋ฆด ๊ฒƒ์ด๋ฉฐ ์ง€๊ธˆ๋ถ€ํ„ฐ ๋ช‡ ๋‹ฌ ์•ˆ์— ๋ˆ„๊ตฐ๊ฐ€ ์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์˜ค๋ž˜๋˜์—ˆ๋‹ค๋Š” ๊ฒƒ์„ ๋ฐœ๊ฒฌํ•˜์ง€ ๋ชปํ•˜๋Š” ์ด๋ฏธ์ง€๊ฐ€ ๋‚˜ํƒ€๋‚˜์ง€ ์•Š๋Š” ์ด์œ ๋ฅผ ์•Œ์•„๋‚ด๋Š” ๋ฐ 2์ผ์„ ๋ณด๋‚ผ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋‹น์‹ ์ด ์ƒ๊ฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ์—์„œ ์ด๋ฏธ์ง€๊ฐ€ ๋ˆ„๋ฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ์—์„œ ์‹คํ–‰ํ•˜๋Š” ๊ฒฝ์šฐ ๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ ์ž์‚ฐ์˜ ํด๋”์—์„œ ์ด๋ฏธ์ง€๋ฅผ ๋กœ๋“œํ•˜๋Š” ์กฐ๊ฑด์„ ์ถ”๊ฐ€ํ•˜๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” https://github.com/react-native-device-info/react-native-device-info ๋ฅผ ๋„์šธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค(์•„์ง ์‹œ๋„ํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค).
    ๋ˆ„๊ตฐ๊ฐ€๊ฐ€ ์ด ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์˜ ํ˜œํƒ์„ ๋ฐ›์„ ์ˆ˜ ์žˆ๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.

@RutsSantos ๋Š” ์ด๊ฒƒ์— ๋Œ€ํ•ด์„œ๋„ ์ €์—๊ฒŒ ํšจ๊ณผ์ ์ด์—ˆ์Šต๋‹ˆ๋‹ค!

  1. npm install --react-native-fix-image ์ €์žฅ
  2. npx ๋ฐ˜์‘ ๋„ค์ดํ‹ฐ๋ธŒ ์ˆ˜์ • ์ด๋ฏธ์ง€
  3. ์žฌ๊ฑด ํ”„๋กœ์ ํŠธ

๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ๋‹ค ๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰

RN 0.61์—์„œ๋Š” ์ž‘๋™ํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.

์ €๋Š” RN 0.61์„ ์‚ฌ์šฉํ•˜๋Š”๋ฐ ์–ด๋–ค ์†”๋ฃจ์…˜๋„ ์ €์—๊ฒŒ ์ ํ•ฉํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. Pls, ๋‹ค๋ฅธ ํ•ด๊ฒฐ์ฑ…์ด ์žˆ์Šต๋‹ˆ๊นŒ?

๋‚˜๋Š” RN 0.61์„ ์‚ฌ์šฉํ•˜๊ณ  ์–ด๋–ค ์†”๋ฃจ์…˜๋„ ์ €์—๊ฒŒ ์ ํ•ฉํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. Pls, ๋‹ค๋ฅธ ํ•ด๊ฒฐ์ฑ…์ด ์žˆ์Šต๋‹ˆ๊นŒ?

https://www.npmjs.com/package/react-native-fix-image

๋‚ด ์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” ์—ฌ์ „ํžˆ RN 0.61์—์„œ ์ž˜ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

๋‚˜๋Š” RN 0.61์„ ์‚ฌ์šฉํ•˜๊ณ  ์–ด๋–ค ์†”๋ฃจ์…˜๋„ ์ €์—๊ฒŒ ์ ํ•ฉํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. Pls, ๋‹ค๋ฅธ ํ•ด๊ฒฐ์ฑ…์ด ์žˆ์Šต๋‹ˆ๊นŒ?

https://www.npmjs.com/package/react-native-fix-image

๋‚ด ์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” ์—ฌ์ „ํžˆ RN 0.61์—์„œ ์ž˜ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

์•ˆ๋…•ํ•˜์„ธ์š” Huy ์œ„์˜ ๊ฐ€์ด๋“œ๋Œ€๋กœ ๋‹จ๊ณ„๋ณ„๋กœ ์‹œ๋„ํ–ˆ๋Š”๋ฐ ์ˆ˜์ • ์ด๋ฏธ์ง€๊ฐ€ ํ‘œ์‹œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ios 14์—์„œ๋Š” ์—ฌ์ „ํžˆ ์ด๋ฏธ์ง€๊ฐ€ ํ‘œ์‹œ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋‹ค๋ฅธ ios ๋ฒ„์ „์—์„œ๋Š” ์—ฌ์ „ํžˆ ์ด๋ฏธ์ง€๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.
์ €๋Š” RN 0.61๊ณผ ios 14๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰