Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

jdzak
Copy link

@jdzak jdzak commented Aug 29, 2018

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

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
@jdzak jdzak changed the title Fix "'React/fishhook.h' file not found" error in RCTReconnectingWebSocket.m Fix "'React/fishhook.h' file not found" error in RCTReconnectingWebSocket.m (RN 0.55.4) Aug 29, 2018
@@ -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>'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdzak
Copy link
Author

jdzak commented Aug 29, 2018

@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"'
Copy link
Collaborator

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.

Copy link
Author

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>.

Copy link
Collaborator

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

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe frameworks vs libs?

Copy link
Collaborator

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.

Copy link
Author

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.

Copy link
Owner

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 👍

@jdzak jdzak closed this Aug 31, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants