I'm so happy about any new RN release, so i tested the new version you just released a few minutes ago. 馃槒
Thanks for pushing RN forward! 馃憤
But after upgrading my project (which uses CocoaPods) to react-native 0.56.0 and can not run pod install anymore, because the linked Folly version is not published in the CocoaPods repo.
Run react-native info in your terminal and paste its contents here.
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.5
CPU: x64 Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
Memory: 24.26 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.1.0 - ~/.nvm/versions/node/v10.1.0/bin/node
Yarn: 1.7.0 - /usr/local/bin/yarn
npm: 5.10.0 - ~/.nvm/versions/node/v10.1.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
Android SDK:
Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 27.0.2, 27.0.3
API Levels: 23, 25, 26, 27
IDEs:
Android Studio: 3.0 AI-171.4443003
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
When using the new version with CocoaPods it links to Folly version 2016.10.31.00:
https://github.com/facebook/react-native/blob/master/React.podspec#L16
I get this error when running pod install
[!] CocoaPods could not find compatible versions for pod "Folly":
In snapshot (Podfile.lock):
Folly (= 2016.09.26.00)
In Podfile:
React/CxxBridge (from `../node_modules/react-native`) was resolved to 0.56.0, which depends on
Folly (= 2016.10.31.00)
Specs satisfying the `Folly (= 2016.09.26.00), Folly (= 2016.10.31.00)` dependency were found, but they required a higher minimum deployment target.
This happens also after running pod repo update.
pod search Folly returns:
-> Folly (2016.09.26.00)
An open-source C++ library developed and used at Facebook.
pod 'Folly', '~> 2016.09.26.00'
- Homepage: https://github.com/facebook/folly
- Source: https://github.com/facebook/folly.git
- Versions: 2016.09.26.00 [master repo]
See also https://github.com/CocoaPods/Specs/tree/master/Specs/f/6/1/Folly
My Podfile in the ios folder:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
def react_pods
# Yoga
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
# React
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
'RCTBlob',
'RCTImage',
'RCTNetwork',
'RCTLinkingIOS',
'RCTSettings',
'RCTText',
'RCTWebSocket',
'RCTAnimation',
'RCTPushNotification',
'RCTActionSheet',
'RCTGeolocation',
# From https://github.com/facebook/react-native/issues/17027
# If we do not need this to build successfully, we can remove this.
'tvOS',
]
# more dependencies...
end
target 'MY_APP_TARGET' do
react_pods
end
#target 'MY_APP_SECOND_TARGET' do
# react_pods
#end
# From https://github.com/facebook/react-native/issues/17274#issuecomment-356363557
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'yoga'
target.build_configurations.each do |config|
config.build_settings['GCC_WARN_64_TO_32_BIT_CONVERSION'] = 'NO'
end
end
if target.name == 'React'
target.remove_from_project
end
end
end
You'll need these lines in your Podfile as described in https://facebook.github.io/react-native/docs/integration-with-existing-apps.html:
# Third party deps podspec link
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
Oh, thank you for that hint. Will test it now...
edit: That helps me. Thank you! 馃憤
@jerolimov did that work for you?
I added those lines to the Podfile and update the pod repo but i'm still getting:
[!] CocoaPods could not find compatible versions for pod "Folly":
In snapshot (Podfile.lock):
Folly (= 2016.09.26.00)
In Podfile:
Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
None of your spec sources contain a spec satisfying the dependencies: `Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`), Folly (= 2016.09.26.00)`.
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
@gianpaj Yes this help me. I temporary removed the Podfile.lock file and run pod install because of this snapshot mismatch problem.
After that the Podfile.lock was generated again and looks similar and everything is working again.
@jerolimov deleting the lock file worked! 馃帀 thanks a lot 馃槂
Removing the whole Podfile.lock file is not recommended.
It contains the references to the current versions of Pods your project use.
If your Podfile doesn't specify a specific version for each Pod, deleting the Podfile.lock will install the latest version for each pod which can break your build or cause other issues you may not notice.
I recommend deleting the specific lines in the Podfile.lock that related to Folly or any other pod that fail to install.
Most helpful comment
@gianpaj Yes this help me. I temporary removed the Podfile.lock file and run pod install because of this snapshot mismatch problem.
After that the Podfile.lock was generated again and looks similar and everything is working again.