์ด๋ฏธ์ง๋ iOS 14์์ ์ด๋ฏธ์ง๋ฅผ ํ์ํ ์ ์์ง๋ง ๋ค์๊ณผ ๊ฐ์ด ์์น๋ฅผ ํ์ํ ์ ์์ต๋๋ค.
ํ์('./์ด๋ฏธ์ง/add_scan_images.png')
}
/>
ํ๊ฒฝ:
Xcode ๋ฒ์ 12.0 ๋ฒ ํ(12A6159)
์๋ฎฌ๋ ์ดํฐ: iPhone SE - 2์ธ๋ - 14.0
"๋ฐ์": "16.11.0",
"๋ฐ์ ๋ค์ดํฐ๋ธ": "0.62.2"
:๊ฒฝ๊ณ : | ๋๋ฝ๋ ํ๊ฒฝ ์ ๋ณด |
---|---|
:์ ๋ณด ์ถ์ฒ: | ๋ฌธ์ ์ ๊ฐ๋ฐ ํ๊ฒฝ์ ๋ํ ์ ๋ณด๊ฐ ๋๋ฝ๋์์ ์ ์์ต๋๋ค. ์ฝ์์์ 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 ๊ตฌํ์ ์ฌ์ฉํ์ฌ ์ด๋ฏธ์ง ๋ ๋๋ง์ ์ฒ๋ฆฌํ ์ ์์ง๋ง ์ฌ๋ฐ๋ฅธ ์์ ์ธ์ง ํ์ ํ ์ ์์ต๋๋ค.
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 ํ๋ก๊ทธ๋จ์ ์ ๋ฐ์ดํธํ ํ์ ๋ฐ์ํ์ต๋๋ค. (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 ๊ฐ์ฌํฉ๋๋ค..
_currentFrame์ด nil์ธ ๊ฒฝ์ฐ
[super displayLayer:layer];
๋ฅผ ์ถ๊ฐํ ํ ์ด๋ฏธ์ง๋ฅผ ํ์ํ ์ ์์ต๋๋ค.๋ด๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ดํดํ๋ค๋ฉด _currentFrame์ ์ ๋๋ฉ์ด์ ์ด๋ฏธ์ง์ฉ์ด์ด์ผ ํฉ๋๋ค. ๋ฐ๋ผ์ ์คํธ ์ด๋ฏธ์ง์ธ ๊ฒฝ์ฐ UIImage ๊ตฌํ์ ์ฌ์ฉํ์ฌ ์ด๋ฏธ์ง ๋ ๋๋ง์ ์ฒ๋ฆฌํ ์ ์์ง๋ง ์ฌ๋ฐ๋ฅธ ์์ ์ธ์ง ํ์ ํ ์ ์์ต๋๋ค.
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 -L289if (_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)์์ ์ด๋ฏธ์ง๊ฐ ์ด๋ฏธ์ง๋ฅผ ํ์ํ ์ ์์ต๋๋ค.
์ด ๋ฌธ์ ๊ฐ ๋ฐ์ํ๋ฉด ์ด ๋งํฌ์ ๋จ๊ณ์ ๋ฐ๋ผ ํด๊ฒฐํ์ต๋๋ค.
โ
๋น์ ์ด ๋๊ธ์ ๋ฌ์๊ธฐ ๋๋ฌธ์ ์ด๊ฒ์ ๋ฐ๋ ๊ฒ์
๋๋ค.
์ด ์ด๋ฉ์ผ์ ์ง์ ๋ต์ฅํ๊ฑฐ๋ 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๋ก ์ ๊ทธ๋ ์ด๋ํ์ต๋๋ค.
์๋ฒฝํ๊ฒ ์๋ํฉ๋๋ค.
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.
๋ฐ ios14
์ RN0.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 ๊ตฌํ์ ์ฌ์ฉํ์ฌ ์ด๋ฏธ์ง ๋ ๋๋ง์ ์ฒ๋ฆฌํ ์ ์์ง๋ง ์ฌ๋ฐ๋ฅธ ์์ ์ธ์ง ํ์ ํ ์ ์์ต๋๋ค.
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 ๊ตฌํ์ ์ฌ์ฉํ์ฌ ์ด๋ฏธ์ง ๋ ๋๋ง์ ์ฒ๋ฆฌํ ์ ์์ง๋ง ์ฌ๋ฐ๋ฅธ ์์ ์ธ์ง ํ์ ํ ์ ์์ต๋๋ค.
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๊ฐ์ง ์๋ฃจ์ :
"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 ๋ ์ด๊ฒ์ ๋ํด์๋ ์ ์๊ฒ ํจ๊ณผ์ ์ด์์ต๋๋ค!
- npm install --react-native-fix-image ์ ์ฅ
- npx ๋ฐ์ ๋ค์ดํฐ๋ธ ์์ ์ด๋ฏธ์ง
- ์ฌ๊ฑด ํ๋ก์ ํธ
๋๋ฅผ ์ํด ์ผํ๋ค ๐๐๐๐๐
Xcode 12.0.1์ RN 0.59.0. ๋ฐ ios 14. ์๋ฃจ์ ์ด ์์ต๋๊น?
3๊ฐ์ง ์๋ฃจ์ :
- node_modules ๋ด์์ ์๋์ผ๋ก ๋ฌธ์ ์์
- ์ด ์์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ฌ์ฉํ์ญ์์ค. https://www.npmjs.com/package/react-native-fix-image
- 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 ๊ตฌํ์ ์ฌ์ฉํ์ฌ ์ด๋ฏธ์ง ๋ ๋๋ง์ ์ฒ๋ฆฌํ ์ ์์ง๋ง ์ฌ๋ฐ๋ฅธ ์์ ์ธ์ง ํ์ ํ ์ ์์ต๋๋ค.
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_ ์ด๋ฏธ์ง๊ฐ ๋ก๋๋๋ค๋ ์ฌ์ค์ ๊ธฐ๋ฐ์ผ๋ก ํฉ๋๋ค.
๋ด ํด๊ฒฐ ๋ฐฉ๋ฒ,
<Image
source={{ uri: 'app_icon' }}
style={{ width: 40, height: 40 }}
/>
๊ทธ๊ฒ์ (๋๋ฅผ ์ํด) ์๋ํ์ง๋ง, ๋จ์ ,
@RutsSantos ๋ ์ด๊ฒ์ ๋ํด์๋ ์ ์๊ฒ ํจ๊ณผ์ ์ด์์ต๋๋ค!
- npm install --react-native-fix-image ์ ์ฅ
- npx ๋ฐ์ ๋ค์ดํฐ๋ธ ์์ ์ด๋ฏธ์ง
- ์ฌ๊ฑด ํ๋ก์ ํธ
๋๋ฅผ ์ํด ์ผํ๋ค ๐๐๐๐๐
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๋ฅผ ์ฌ์ฉํฉ๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
_currentFrame์ด nil์ธ ๊ฒฝ์ฐ
[super displayLayer:layer];
๋ฅผ ์ถ๊ฐํ ํ ์ด๋ฏธ์ง๋ฅผ ํ์ํ ์ ์์ต๋๋ค.๋ด๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ดํดํ๋ค๋ฉด _currentFrame์ ์ ๋๋ฉ์ด์ ์ด๋ฏธ์ง์ฉ์ด์ด์ผ ํฉ๋๋ค. ๋ฐ๋ผ์ ์คํธ ์ด๋ฏธ์ง์ธ ๊ฒฝ์ฐ UIImage ๊ตฌํ์ ์ฌ์ฉํ์ฌ ์ด๋ฏธ์ง ๋ ๋๋ง์ ์ฒ๋ฆฌํ ์ ์์ง๋ง ์ฌ๋ฐ๋ฅธ ์์ ์ธ์ง ํ์ ํ ์ ์์ต๋๋ค.
https://github.com/facebook/react-native/blob/1c634a921887caf02f1b9fba6fd177c352f9ef78/Libraries/Image/RCTUIImageViewAnimated.m#L283 -L289