Reputation: 689
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'
Upvotes: 28
Views: 12411
Reputation: 12347
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
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'"
Upvotes: 21
Reputation: 1702
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
Upvotes: 1
Reputation: 640
This helped me:
Remove and add again libfishhook.a from Xcode and the path issue will resolve.
Upvotes: 52
Reputation: 2458
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.
...
Upvotes: 10