Closed eahrold closed 5 years ago
+1
Hmm, interesting, I'm unable to replicate this. Can you try relinking or if you're using cocoapods, run pod install?
Tried 3 times, nothing changes
Could you try upgrading react-native? Are you able to reproduce this in a clean project?
I use react-native 0.59.9, tried everything, nothing works
I first detected this issue w/ AppCenter builds, so the builds were clean Here are a list of my dependancies. I did have to hold at RN 0.59.3, for other reasons, but maybe you can reproduce with these. It is really weird that it's not finding the header.
"dependencies": {
"@react-native-community/async-storage": "^1.2.2",
"@react-native-community/netinfo": "^3.2.0",
"axios": "^0.18.0",
"base-64": "^0.1.0",
"bcryptjs": "^2.4.3",
"ecdsa-secp256r1": "^1.3.3",
"eosjs": "^20.0.0",
"history": "^4.9.0",
"isaac": "0.0.5",
"js-crypto-ec": "^0.5.0",
"localstorage-polyfill": "^1.0.1",
"lodash": "^4.17.11",
"moment": "^2.24.0",
"node-jose": "^1.1.3",
"node-libs-react-native": "^1.0.3",
"p-cancelable": "^2.0.0",
"react": "16.8.3",
"react-native": "0.59.3",
"react-native-bcrypt": "^2.4.0",
"react-native-bip39": "^2.3.0",
"react-native-camera": "^2.1.1",
"react-native-config": "^0.11.7",
"react-native-device-info": "^1.5.0",
"react-native-gesture-handler": "^1.1.0",
"react-native-image-store": "^1.0.0",
"react-native-keyboard-aware-scrollview": "^2.0.0",
"react-native-keychain": "^3.1.1",
"react-native-qrcode": "^0.2.7",
"react-native-qrcode-scanner": "^1.1.2",
"react-native-svg": "^9.5.0",
"react-native-touch-id": "^4.4.1",
"react-native-vector-icons": "^6.4.2",
"react-native-webview": "^5.8.1",
"react-navigation": "^3.5.1",
"react-zlib-js": "^1.0.4",
"seamless-immutable": "^7.1.4",
"stream-browserify": "^2.0.2"
},
"devDependencies": {
"@babel/core": "^7.4.0",
"@babel/runtime": "^7.4.2",
"@react-native-community/eslint-config": "0.0.3",
"babel-jest": "^24.5.0",
"babel-plugin-module-resolver": "^3.2.0",
"eslint": "^5.15.3",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"faker": "^4.1.0",
"jest": "^24.5.0",
"metro-react-native-babel-preset": "^0.53.1",
"prettier": "1.17.1",
"react-test-renderer": "16.8.3"
},
Got it! react-native link is not working as expected. just use pod and everything is working.
@SmirnovM91 That's interesting. I'm not using CocoaPods to install this, so I'm wondering if the Header Search Paths for this lib got changed in the 9.5.0 branch.
I'm testing with react-native 0.60, where cocoapods are the default, and works fine. Haven't tested with plain linking in pre v60.
I noticed that RCTGIFImageDecoder.h
is getting imported in RNSVGImage.m
, but it doesn't look like it's used
Here'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.
That import come in a pr which did nothing except add that import, to fix some cocoapods issue: https://github.com/react-native-community/react-native-svg/pull/1002
Ha .... stealing from Peter to pay Paul
I can replicate the issue by not using cocoapods in the latest stable react-native. This seems like a tricky tradeoff. Should find some way to get it to find the header with normal linking. Seems to be something strange with the structure. @janicduplessis @shergin Could you or someone on the rn team please advise?
That really strange, I don't see anywhere that RCTGIFImageDecoder
is used in react-native-svg, can you point me to where I may find it being used. [Edited] I know it's Part of the RTCImage Lib.
Seems like it's not included in the "Headers" and "Copy Headers" build phases of the React.xcodeproj, and thus they can't be imported unless they're added there. I wonder why it would even be needed, seems to me it shouldn't, but the PR got several stars very quickly so it seemed like a legit issue. A shame if it's strictly needed for cocoapods to work correctly, but won't work for non-cocoapods without patching/modifying React.xcodeproj.
@eahrold I published v9.5.1 with that pr reverted.
@msand Thanks. I can confirm it builds for me now.
@msand Thank you.
npm install react-native-svg
react-native run-ios
Works :)
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?
@jakecronin that worked for me too
Bug
iOS Build Started Failing with 9.5.0 (9.4.0 works fine)
Environment info
React native info output:
Library version: 9.5.0
Steps To Reproduce
Describe what you expected to happen:
Full Output of
react-native run-ios