react-native-svg: iOS Build Started Failing with 9.5.0
Bug
iOS Build Started Failing with 9.5.0 (9.4.0 works fine)
▸ Compiling RNSVGImage.m
❌ /../node_modules/react-native-svg/ios/Elements/RNSVGImage.m:13:9: 'React/RCTGIFImageDecoder.h' file not found
#import <React/RCTGIFImageDecoder.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Environment info
React native info output:
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Memory: 1.24 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.3 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 21, 23, 24, 25, 26, 27, 28
Build Tools: 23.0.1, 24.0.1, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 28.0.3
System Images: a...gle_apis | Google APIs Intel x86 Atom_64 ..., a... | Intel x86 Atom_64, a...pis | Google APIs ARM EABI v7a Syste..., a...gle_apis | Google APIs Intel x86 Atom_64 ..., a...s_playstore | Google Play Intel x86 Atom Sys...
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5314842
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.3 => 0.59.3
npmGlobalPackages:
react-native-cli: 2.0.1
Library version: 9.5.0
Steps To Reproduce
Describe what you expected to happen:
- iOS Build should succeed
Full Output of react-native run-ios
> react-native run-ios
info Found Xcode workspace MyProject.xcworkspace
info Building using "xcodebuild -workspace MyProject.xcworkspace -configuration Debug -scheme OpesOne -destination id=A5621FA4-D684-480B-830A-5F59BEA4663F -derivedDataPath build/<MyProject"
The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.1. (in target 'TouchID')
Not running swift-stdlib-tool: ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES is enabled, but the product type 'com.apple.product-type.library.static' is not a wrapper type. (in target 'RNReactNativeZoomSdk')
▸ Running script 'Start Packager'
▸ Running script 'Include RCTJSCProfiler'
▸ Running script 'Run Script'
▸ Compiling ReactNativeConfig.m
▸ Building library libReactNativeConfig.a
▸ Compiling RNSVGBezierElement.m
▸ Compiling RNSVGTextProperties.m
▸ Compiling RNSVGCircle.m
▸ Compiling RNSVGBrush.m
▸ Compiling RCTConvert+RNSVG.m
▸ Compiling RNSVGClipPathManager.m
▸ Compiling RNSVGDefs.m
▸ Compiling RNSVGDefsManager.m
▸ Compiling RNSVGClipPath.m
▸ Compiling RNSVGViewBox.m
▸ Compiling RNSVGUseManager.m
▸ Compiling RNSVGUse.m
▸ Compiling RNSVGTextPathManager.m
▸ Compiling RNSVGTextPath.m
▸ Compiling RNSVGTextManager.m
▸ Compiling RNSVGText.m
▸ Compiling RNSVGTSpanManager.m
▸ Compiling RNSVGTSpan.m
▸ Compiling RNSVGSymbolManager.m
▸ Compiling RNSVGSymbol.m
▸ Compiling RNSVGSvgViewManager.m
▸ Compiling RNSVGSvgView.m
▸ Compiling RNSVGSolidColorBrush.m
▸ Compiling RNSVGRenderableManager.m
▸ Compiling RNSVGRenderable.m
▸ Compiling RNSVGRectManager.m
▸ Compiling RNSVGRect.m
▸ Compiling RNSVGRadialGradientManager.m
▸ Compiling RNSVGRadialGradient.m
▸ Compiling RNSVGPropHelper.m
▸ Compiling RNSVGPercentageConverter.m
▸ Compiling RNSVGPatternManager.m
▸ Compiling RNSVGPattern.m
▸ Compiling RNSVGPathParser.m
▸ Compiling RNSVGPathManager.m
▸ Compiling RNSVGPath.m
▸ Compiling RNSVGPainterBrush.m
▸ Compiling RNSVGPainter.m
▸ Compiling RNSVGNodeManager.m
▸ Compiling RNSVGNode.m
▸ Compiling RNSVGMaskManager.m
▸ Compiling RNSVGMask.m
▸ Compiling RNSVGLinearGradientManager.m
▸ Compiling RNSVGLinearGradient.m
▸ Compiling RNSVGLineManager.m
▸ Compiling RNSVGLine.m
▸ Compiling RNSVGLength.m
▸ Compiling RNSVGImageManager.m
▸ Compiling RNSVGImage.m
❌ /.../node_modules/react-native-svg/ios/Elements/RNSVGImage.m:13:9: 'React/RCTGIFImageDecoder.h' file not found
#import <React/RCTGIFImageDecoder.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
▸ Compiling RNSVGGroupManager.m
▸ Compiling RNSVGGroup.m
▸ Compiling RNSVGGlyphContext.m
▸ Compiling RNSVGFontData.m
▸ Compiling RNSVGEllipseManager.m
▸ Compiling RNSVGEllipse.m
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening MyProject.xcworkspace
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 20
i faced error: Declaration of ‘RCTImageLoaderCancellationBlock’ must be imported from module ‘React.RCTGIFImageDecoder’ before it is required in RNSVGImage.m But i cant fix this. Can u help me?
I noticed that
RCTGIFImageDecoder.his getting imported inRNSVGImage.m, but it doesn’t look like it’s usedHere’s the diff between 9.4.0 and 9.5.0 https://github.com/react-native-community/react-native-svg/compare/9.4.0...9.5.0#diff-2cfcf6db21340daa07cc44b787f6ee23R13
Removing that import fixes this issue for me.