-
Notifications
You must be signed in to change notification settings - Fork 25
Fix "'React/fishhook.h' file not found" error in RCTReconnectingWebSocket.m (RN 0.55.4) #25
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
RCTReconnectingWebSocket.m There has been a problem importing fishhook in multiple versions of react-native. This fixes works for react-native 0.55.4. facebook/react-native#16039
@@ -94,8 +94,8 @@ def detect_missing_subspecs | |||
if has_dev_support | |||
# Move Fishhook to be based on RN's imports | |||
websocket = 'Libraries/WebSocket/RCTReconnectingWebSocket.m' | |||
websocket_old_code = 'import <fishhook/fishhook.h>' | |||
websocket_new_code = 'import <React/fishhook.h>' | |||
websocket_old_code = 'import <React/fishhook.h>' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no <React/fishhook.h>
import in 0.55 so this is not correct: https://github.com/facebook/react-native/blob/099410b8f670d0115ab92d8e064153f8ff04aa04/Libraries/WebSocket/RCTReconnectingWebSocket.m#L12
@ikesyo You are right. Fixed. |
@@ -95,7 +95,7 @@ def detect_missing_subspecs | |||
# Move Fishhook to be based on RN's imports | |||
websocket = 'Libraries/WebSocket/RCTReconnectingWebSocket.m' | |||
websocket_old_code = 'import <fishhook/fishhook.h>' | |||
websocket_new_code = 'import <React/fishhook.h>' | |||
websocket_new_code = 'import "fishhook.h"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change should not be needed; <React/fishhook.h>
should work and actually it works for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, can I ask what your Podfile looks like? I'm having compilation issues where XCode can't find <React/fishhook.h>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just like the one described in https://facebook.github.io/react-native/docs/integration-with-existing-apps.html
# The target name is most likely the name of your project.
target 'NumberTileGame' do
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge', # Include this for RN >= 0.47
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
'RCTText',
'RCTNetwork',
'RCTWebSocket', # Needed for debugging
'RCTAnimation', # Needed for FlatList and animations running on native UI thread
# Add any other subspecs you want to use in your project
]
# Explicitly include Yoga if you are using RN >= 0.42.0
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
# 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'
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe frameworks vs libs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't had issues with either, framework or lib.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm closing this because I think the problem I ran into was related to me linking to an out of date static library. I got rid of the static library and now I don't need this. Thanks for the help all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for giving it a shot 👍
There has been a problem importing fishhook in multiple versions of react-native. This fixes works for react-native 0.55.4.
facebook/react-native#16039