Search code examples
iosreact-nativecocoapods

Use use_frameworks! on a reactnative project


My podfile cotains static library from reactnative on node_modules and also third-party-podspecs like Folly.podspec, glog.podspec, DoubleConversion.podspec and a dynamic swift library

when i try to excecute the projet i have errors with third-party-podspecs double-conversion/double-conversion.h' file not found

here is my podfile :

   platform :ios, '10.0'
  require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

   #sdk id libs
  source 'https://gitlab-repoxxxxxxxf.fr/dosn/xxxx.git'
  source 'https://github.com/CocoaPods/Specs.git'


 target 'MyProject' do
 use_frameworks!
 # Pods for DigiDrive
 pod 'React', :path => '../node_modules/react-native/'
 pod 'React-Core', :path => '../node_modules/react-native/React'
 pod 'React-DevSupport', :path => '../node_modules/react-native/React'
 pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

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

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'

pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'



pod 'react-native-simple-toast', :path => '../node_modules/react-native-simple-toast'
#sdk id libs
pod 'IMPORTANTLIB'

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

use_native_modules!
end
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, 
 :verify_no_static_framework_transitive_dependencies) {}
 end
target 'MyProject-tvOS' do
 # Pods for DigiDrive-tvOS

target 'MyProject-tvOSTests' do
inherit! :search_paths
# Pods for testing
end


end

How can i resolve this problem ?


Solution

  • I just do more search and i understand that react native 0.60 version doesn't support use of use_frameworks!, so i had to pass to the last react native version : 0.63.0 but the problem is that several version of libs has to be changed on reactNative