Same problem as in yoga/yoga.h file not found RCTConvert.h but the answer there doesn't help.
I am using Xcode 11.3 on macOS Catalina (10.15.4), react-native 0.62.2, and getting this error when I try to build.
Any idea what I should do?
The import statement in RCTConvert.h:
#import <yoga/Yoga.h>
Files' locations
./node_modules/react-native/React/Base/RCTConvert.h
./node_modules/react-native/ReactCommon/yoga/yoga/Yoga.h
Build settings -> Header Search Path
As you can see below, I tried to add the yoga directory. Didn't help.
This is my podfile:
platform :ios, '11.0'
target 'xxx' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
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-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
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-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
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 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
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'
# Pods for xxx
pod 'RNSquareInAppPayments', :path => '../node_modules/react-native-square-in-app-payments'
pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
pod 'react-native-nfc-manager', :path => '../node_modules/react-native-nfc-manager'
target 'xxxTests' do
inherit! :search_paths
# Pods for testing
end
end
target 'xxx-tvOS' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for xxx-tvOS
target 'xxx-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
I ended with the following podfile, which is working:
platform :ios, '11.1'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'xxx' do
# Pods for xxx
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
pod 'react-native-netinfo', :path => '../node_modules/#react-native-community/netinfo'
pod 'RNCAsyncStorage', :path => '../node_modules/#react-native-community/async-storage'
pod 'react-native-restart', :path => '../node_modules/react-native-restart'
pod 'react-native-blur', :path => '../node_modules/#react-native-community/blur'
pod 'RNSentry', :path => '../node_modules/#sentry/react-native'
pod 'react-native-version-info', :path => '../node_modules/react-native-version-info'
pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
target 'xxxTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'xxx-tvOS' do
# Pods for xxx-tvOS
target 'xxx-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
In my case, I was able to resolve this problem by updating to the latest version of cocoapods (from 1.5.0 to 1.10.0).
You can check which version of cocoapods you have installed with this command: gem which cocoapods
Related
I am switching from tinycreative/react-native-intercom to intercom/intercom-react-native. In the former's docs, it says to add Intercom to my Podfile like this:
So, since I am uninstalling it I want to remove it. However, when I search for it, it's not there. Here is the Podfile in question:
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native/scripts/react_native_pods'
$FirebaseSDKVersion = '7.0.0'
platform :ios, '13.0'
target 'ProjectName' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
target 'ProjectNameTests' do
inherit! :complete
# Pods for testing
end
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
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-Core/RCTWebSocket', :path => '../node_modules/react-native/'
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 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
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 'RCT-Folly', :podspec => '../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec'
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-maps', path: rn_maps_path
pod 'react-native-google-maps', path: rn_maps_path # Uncomment this line if you want to support GoogleMaps on iOS
pod 'GoogleMaps' # Uncomment this line if you want to support GoogleMaps on iOS
pod 'Google-Maps-iOS-Utils' # Uncomment this line if you want to support GoogleMaps on iOS
# Pods for Everybody
# pod 'AppCenter/Analytics', '~> 1.14.0'
# pod 'AppCenter/Crashes', '~> 1.14.0'
# pod 'AppCenterReactNativeShared', '~> 1.13.0'
pod 'appcenter-core', path: '../node_modules/appcenter/ios'
pod 'appcenter-analytics', path: '../node_modules/appcenter-analytics/ios'
pod 'appcenter-crashes', path: '../node_modules/appcenter-crashes/ios'
# CodePush plugin dependency
pod 'CodePush', :path => '../node_modules/react-native-code-push'
# geolocation
pod 'react-native-geolocation', path: '../node_modules/#react-native-community/geolocation'
pod 'RNStoreReview', :path => '../node_modules/react-native-store-review/ios'
pod 'RNShare', :path => '../node_modules/react-native-share'
pod 'react-native-cookies', :path => '../node_modules/#react-native-cookies/cookies'
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0', 'Flipper-RSocket' => '1.3.1' })
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
What's going on here? How is it still working if it's not being imported? Appreciate anyone's help.
For anyone that stumbles upon this, I think the answer turned out to be that some dependencies are not explicitly imported, but implicitly, and this ended up being one of them. Not quite sure how, maybe something to do with the required node_modules at the top, but that's my best guess.
I'm having trouble updating to React Native v60.4. I have React being installed via Pods and all of it's dependencies along with a few other packages. These all work fine. The issue is when I manually link a library in build phases. The only way I can get this to work is by adding /ios/Pods/Headers/Public into their headers search paths but that will get wiped every time I run yarn
This used to be fine in older versions because I would remove the pod React target in favour of a manually linked libReact.a. Now that's an issue because I can't remove the React-Core target so I get duplicate symbol errors.
target 'AppName' do
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-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
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-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
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 'Firebase/Core', '~> 4.13.0'
pod 'Intercom'
pod 'react-native-camera', path: '../node_modules/react-native-camera'
pod 'react-native-intercom', :path => '../node_modules/react-native-intercom'
pod 'react-native-shimmer', :path => '../node_modules/react-native-shimmer'
pod 'react-native-twilio-video-webrtc', path: '../node_modules/react-native-twilio-video-webrtc'
pod 'react-native-document-picker', :path => '../node_modules/react-native-document-picker'
pod 'Stripe', '~> 13.2.0'
pod 'RNCAsyncStorage', :path => '../node_modules/#react-native-community/async-storage'
pod 'RNRate', :path => '../node_modules/react-native-rate/ios'
pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions'
inherit! :search_paths
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
pod 'react-native-maps', :path => '../node_modules/react-native-maps'
pod 'RNStoreReview', :path => '../node_modules/react-native-store-review/ios'
pod 'RCTRestart', :path => '../node_modules/react-native-restart/ios'
pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'
pod 'BugsnagReactNative', :path => '../node_modules/bugsnag-react-native'
end
When building, I keep getting:
node_modules/react-native/React/Base/RCTBridgeModule.h:10:9: 'React/RCTDefines.h' file not found
I need to Use FaceBook Sdk Swift 4.1 Branch
pod 'FBSDKCoreKit', :git => 'https://github.com/facebook/facebook-swift-sdk.git' :branch => 'swift-4.1'
pod 'FBSDKLoginKit', :git => 'https://github.com/facebook/facebook-swift-sdk.git' :branch => 'swift-4.1'
pod 'FacebookShare', :git => 'https://github.com/facebook/facebook-swift-sdk.git' :branch => 'swift-4.1'
you have a missing , before :branch
it should be this
pod 'FBSDKCoreKit', :git => 'https://github.com/facebook/facebook-swift-sdk.git', :branch => 'swift-4.1'
pod 'FBSDKLoginKit', :git => 'https://github.com/facebook/facebook-swift-sdk.git', :branch => 'swift-4.1'
pod 'FacebookShare', :git => 'https://github.com/facebook/facebook-swift-sdk.git', :branch => 'swift-4.1'
In my on Rails project I have this setup for Paperclip gem, using the DB extension:
# Image attachment and validations
has_attached_file :image,
:storage => :database,
:url => "/:rails_root/public/system/projects/000/000/:id/original/:filename",
:path => "/:rails_root/public/system/projects/000/000/:id/original/:filename"
Now, the image gets this route:
/C:/Users...
If I get rid of the initial / I get images/C:/Users.... Any idea how to get just the rails_root without anything in front?
I found my solution here config/initializers/paperclip.rb
Paperclip::Attachment.default_options.merge!({
:storage => :database,
:url => ":rails_root/public",
:path => ":rails_root/public"
})
I want to turn my path_names translated only once, and turns he available for all of routes in the routes.rb.
This is my routes.rb now:
PATH_NAMES = { new: 'novo', edit: 'editar', show: 'ver' }
Rails.application.routes.draw do
devise_for :users, controllers: { omniauth_callbacks: 'omniauth_callbacks',
registrations: 'registrations' }
resources :movements, :path => 'fluxo-de-caixa', path_names: PATH_NAMES
resources :movement_categories, :path => '/fluxo-de-caixa/categorias', path_names: PATH_NAMES
resources :installments, :path => 'parcelas', path_names: PATH_NAMES
resources :contracts, :path => 'contratos', path_names: PATH_NAMES
resources :accounts, :path => 'contas', path_names: PATH_NAMES
resources :events, :path => 'eventos', path_names: PATH_NAMES
resources :users, :path => 'usuarios', path_names: PATH_NAMES
resources :spectator, :path => 'espectadores', path_names: PATH_NAMES
devise_scope :user do
get '/cadastrar' => 'devise/registrations#new'
get '/entrar' => 'devise/sessions#new'
get '/editar' => 'devise/registrations#edit'
delete '/sair' => 'devise/sessions#destroy'
end
root 'home#index'
end
I hope you help me!!
My regards! ;D
use scope:
scope(path_names: { new: 'novo', edit: 'editar', show: 'ver' }) do
resources :movements, :path => 'fluxo-de-caixa'
resources :movement_categories, :path => '/fluxo-de-caixa/categorias'
resources :installments, :path => 'parcelas'
resources :contracts, :path => 'contratos'
resources :accounts, :path => 'contas'
resources :events, :path => 'eventos'
resources :users, :path => 'usuarios'
resources :spectator, :path => 'espectadores'
end