Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

Cocoapods always install old React (0.11.0)

$
0
0

I have a problem when I run pod install Pod always downgrade React Installing React 0.11.0 (was 0.55.4)

my pod file:

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '9.0'
project 'BunteMobile.xcodeproj'
target 'BunteMobile' do
  # Comment this line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for BunteMobile
  pod 'Adjust', '~> 4.8.3'
  pod 'Google-Mobile-Ads-SDK'
  pod 'GoogleAds-IMA-iOS-SDK', '~> 3.7'
  pod 'Fabric', '~> 1.7.0'
  pod 'Crashlytics', '~>  3.9'

  pod 'lottie-ios', :path => '../node_modules/lottie-ios'

  pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'

  target 'BunteMobileTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

I read about some solution when I defined react folder from node_modules but this solution doesn't work for me too.

I put into podfile this:

pod 'yoga', path: './node_modules/react-native/ReactCommon/yoga'
pod 'React', :path => '../node_modules/react-native'

but still doesn't work. Downgrade disappear but when I try to build it, I have this error:

/node_modules/react-native/React/Base/RCTConvert.h:17:9: could not build module 'yoga'

I tried the same profile as official RN doc (https://facebook.github.io/react-native/docs/integration-with-existing-apps.html) but still same error.


Solution

I added this into my podfile:

# Pods for React-Native start
  pod 'React', :path => '../node_modules/react-native'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'

Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>