React-native-youtube: Support React Native 0.39.x / 0.40.x Headers

Created on 2 Dec 2016  路  18Comments  路  Source: davidohayon669/react-native-youtube

RN 0.39.0 ships with breaking changes to CSSLayout. 0.40.0 ships with changes to the header imports. This causes the build to fail on the react-native-youtube module:

For 0.39.x users:

screen shot 2016-12-01 at 10 11 24 pm

For 0.40.0 users:
screen shot 2017-01-09 at 11 24 44 am

Most helpful comment

+1 for this issue

All 18 comments

Anyone else having this issue? This is a big blocker for me at the moment.

I have the same issue on my end as well. sadly my experience in iOS both as a developer and user is rather limited so I can't do much about it. for the time being I downgraded to [email protected]

I think u should add this to:

$(SRCROOT)/node_modules/react-native/ReactCommon

to Header Search Path

@sibelius hmm, could you be more verbose? I'm not sure what you mean or what change you're recommending that I make.

+1 for this issue

I did what the error suggested and it worked. Click the error, it will take you to the file RCTConvert.h. Then replace #import with #import "CSSLayout.h"

I know that modifying this file is not the desired solution, but it was a quick fix.

I tried to go for the quick fix of modifying the file but then had to modify a couple more and then ended up with this:

image

Any ideas?

I updated this issue tracker description with another batch of issues that arise for users trying to upgrade to RN 0.40.0. Similar issues, with the way modules are being imported in the headers.

For anyone else who is waiting on this, and unable to upgrade to RN 0.40.0 as a result, I created a temporary, forked version of this repo here: https://github.com/joncursi/react-native-youtube

Add it to package.json with:

    "react-native-youtube": "git+ssh://[email protected]/joncursi/react-native-youtube.git",

I will delete the fork once this repo becomes compatible again.

@joncursi adding that line to my package.json in dependencies equals to an error:

npm ERR! Warning: Permanently added the RSA host key for IP address 'x.x.x.x' to the list of known hosts.
npm ERR! Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

@DarkHollow try using the https url https://github.com/joncursi/react-native-youtube.git

@morelazers yes, it's what I had done a while ago and it worked, thank you anyway!

"react-native-youtube": "git+https://github.com/joncursi/react-native-youtube.git"

screen shot 2017-01-16 at 12 59 44 pm

@DarkHollow I get The above mentioned error when i update my npm with you package,

react native version 0.39

The forked package is for React Native 0.40.0 users. You need to upgrade to 0.40.0 first if you want to use it

I explained the steps we took to fix the RN 0.40 breaking changes in a blogpost, I hope this helps people confronting the issue in several libraries of their projects.

@joncursi is it working on android?

this could help: https://medium.com/@thisismissem/how-to-upgrade-react-native-modules-in-a-backwards-compatible-manner-a5b5c48d590c#.e0a17mwv0

great post by @ThisIsMissEm

@jujumoz can you get this merged too? for RN 0.40

Was this page helpful?
0 / 5 - 0 ratings