@jpgarcia , Thanks for the heads up, have also noticed this change and considering if there's a better way to make the change backward compatible 馃槒
Great!
I forked the repo to perform the update (at least to be able to update the package on my side for now) but it was a PITA to get it running I think that could be related with the 0.10 dev status of the package :( will wait your update then.
Have already published a release 0.10.2-beta.2 to npm, upgrade the package
$ npm install --save [email protected]
$ react-native link
The fix should make RNFB compatible to 0.40 and existing projects, please verify if it works as expected 馃憤
@wkh237 Thanks for the patch! It works if only you remove double quotes from every import with "<...>"
@binchik , thanks for the remind, have fixed and published 0.10.2-beta.3 to npm, please help verify the fix.
Hi, I tested the beta 3, but no luck, it does not work for me.
Duplicate interface definition for class 'RCTBridge'
nevermind, just commented the def line
@mrKlar , thanks for the test, just applied a fix and tested on 0.40 project, please try use the latest version on npm 0.10.2-beta.4
It's working fine for me but only when commented the def line like mrklar said.
You should leave that line commented for next version.
Tested with "react-native-fetch-blob": "0.10.2-beta.4" and react-native 0.40.0
/node_modules/react-native/React/Base/RCTBridge.h:65:1: Duplicate interface definition for class 'RCTBridge'
@leesolway , thanks for the feedback. I have tested the on pure RN 0.40 project for several times and it's working good on my end.
$ react-native init rn040
$ npm install --save react-native-fetch-blob@beta
$ react-native link
If you have installed previous versions before, please remove it ( both react-native-fetch-blob folder in node_modules and the entry in package.json ). If there's another good way to make it backward compatible please let me know, thanks 馃憤
@wkh237 thanks.
I removed the folder and called react-native link again and it worked.
@wkh237 it's working fine.
But with this change we'll have to call react-native link every time we update this library or after a clean install. This is something we are not doing. We only call react-native link once for new libraries.
I think you could change the code replacing OLD_IMPORT to NEW_IMPORT then in prelink.js you check the version <40 not >= 40 and remove NEW_IMPORT in the same way as now.
Doing this you have backward compatibility without breaking the new versions of react native.
@mgiachetti , thanks for the advice, sounds pretty reasonable 馃憤 I'll change this part and release another version.
I have changed the prelink script in 0.10.2-beta.6 please verify the fix, thanks.
I still get /RCTBridge.h:65:1: Duplicate interface definition for class 'RCTBridge' with 0.10.2-beta.6
To make it work, I removed a React Native related reference from Header Search Paths like specified in:
Ref: https://github.com/facebook/react-native/issues/11725
@wkh237 In 0.10.2-beta.6 you still need to call react-native link every time you update the library.
please check if #235 works for you.
For projects with multiple team members requiring a call to react-native link on every install is an issue.
I think:
yarn or npm installreact-native run-iosIs a common workflow that should be supported.
Already published to npm, please upgrade the packge to 0.10.2-beta.8 and verify if it works, thanks !
0.10.2-beta.7 is broken, please use 0.10.2-beta.8 instead
@wkh237 having no issues with beta8 on 0.40 馃憤
Most helpful comment
@wkh237 Thanks for the patch! It works if only you remove double quotes from every import with "<...>"