28

I get this error when i want to run my react native app hello world app on Xcode 10 (new beta version), can you help me? The error :

error: Build input file cannot be found: '/Users/nic/Documents/X-Project/xapp/node_modules/react-native/Libraries/WebSocket/libfishhook.a'

Screen shot from my Xcode

Sajad Beheshti
  • 679
  • 3
  • 8
  • 20
  • you can try this: https://medium.com/@rhdeck/running-react-native-with-xcode-10-beta-1-83c4334e7e0f Did not work for me though. – Kevin Amiranoff Aug 02 '18 at 10:58

4 Answers4

52

This helped me:

Remove and add again libfishhook.a from Xcode and the path issue will resolve.

enter image description here

user4157124
  • 2,809
  • 13
  • 27
  • 42
Donni
  • 630
  • 5
  • 8
21

This issue is caught by the stricter xcode 10 new build system.

A temporary fix while react-native really fix the issue is to switch back to using the old build system

In Xcode, Select File -> Project/Workspace Setting. You will see a Build System option to select the Legacy Build System as shown below

Legacy Build System option

Clear your project and "Derived Data" Build and Run your project

BONUS Point: If you are using a CI/CD pipeline you can also add the xcodebuild argument -UseNewBuildSystem='NO' to the cli or via fastlane xcargs: "-UseNewBuildSystem='NO'"

Gomino
  • 12,127
  • 4
  • 40
  • 49
10

Manually copypasting libfishhook.a into the correct folder, as suggested here, worked for me:

For a solution, I copied the file from my ios/build/Build/Products/Debug-iphonesimulator/libfishhook.a and pasted it into ../node_modules/react-native/Libraries/WebSocket/ and got the build. I hope it helps.

...

Community
  • 1
  • 1
NiFi
  • 2,398
  • 1
  • 17
  • 26
1

Daniel's answer helped me to solve problem. Just note that if it's tvOS, then the same action of removing and adding should be done of RCTWebSocket-tvOS.a

Naren
  • 1,504
  • 16
  • 19