Sajad Beheshti
Sajad Beheshti

Reputation: 689

Run react native app on Xcode 10

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

Upvotes: 28

Views: 12411

Answers (4)

Gomino
Gomino

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

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'"

Upvotes: 21

Naren
Naren

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

Donni
Donni

Reputation: 640

This helped me:

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

enter image description here

Upvotes: 52

NiFi
NiFi

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

Related Questions