React-native-webview: Podfile React dependency?

Created on 18 Oct 2018  路  2Comments  路  Source: react-native-webview/react-native-webview

When I install this using cocoapods, I see:
Using React (0.11.0)

This is an old version of React, and the Cocoapod is deprecated https://cocoapods.org/pods/React
The old version appears to cause native build errors (types and function signatures/names have changed).

Should React be removed as a dependency in the .podspec?

Most helpful comment

It should not be removed, you cannot use cocoapods only for some dependecies and build react the way you used to. When you build react-native using cocoapods, you redirect it to your node_modules so that it takes the correct version. I'll write an article about that since many people are confused !

In the meantime please:
Remove the line containing react-native-webview from your profile.
Rename your podfile to podfile.tmp
Run react-native link react-native-webview
(It should link it the old way and not inside your podfile )
Rename your podfile back to normal
Run pod install

Enjoy :tada:

All 2 comments

It should not be removed, you cannot use cocoapods only for some dependecies and build react the way you used to. When you build react-native using cocoapods, you redirect it to your node_modules so that it takes the correct version. I'll write an article about that since many people are confused !

In the meantime please:
Remove the line containing react-native-webview from your profile.
Rename your podfile to podfile.tmp
Run react-native link react-native-webview
(It should link it the old way and not inside your podfile )
Rename your podfile back to normal
Run pod install

Enjoy :tada:

This worked, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BruceSuperProgramer picture BruceSuperProgramer  路  3Comments

Kelvin9393 picture Kelvin9393  路  3Comments

niranjan-b-prajapati picture niranjan-b-prajapati  路  3Comments

chenop picture chenop  路  3Comments

panda0603 picture panda0603  路  3Comments