Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yoga/Yoga.h header file not found after react-native(0.40.0) integration in the existing iOS app

After integrating react-native in my Swift iOS app, I am not being able to build. yoga/Yoga.h file cannot be found. I have gone through the docs, checked out the react-native github page, checked SO questions on a similar issue. None of the solutions seem to work.

Any help in this would be appreciated. This has ruined my day catastrophically!

Here's my pod file

platform :ios, '9.0'

 use_frameworks!


target 'MyCustomApp' do
    pod 'Alamofire', '~> 4.0'


    pod 'React', :path => './node_modules/react-native', :subspecs => [
    'Core',
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket',# needed for debugging
    'RCTText',
    'RCTImage'
    # Add any other subspecs you want to use in your project
    ]

end
like image 918
MrDank Avatar asked Jan 06 '17 12:01

MrDank


1 Answers

Yoga is CSSLayout renamed: https://github.com/facebook/react-native/commit/7f8c2985a8e447fd18f8b9331d4f35abeadaeb0e.

It seems like this is an issue that has been going on in several react-native versions with CSSLayout and it just happens to have a different name now. Here is a workaround using post_install: https://github.com/facebook/react-native/issues/11272

like image 140
wubadubalublub Avatar answered Nov 15 '22 03:11

wubadubalublub