Reputation: 23
I am learning React Native and am at my wits end on this issue on my very first project. I am trying to install react-native-vector-icons and while everything works perfectly in Android, iOS wont run.
Here are the errors I get (happy to provide any other details that will help, but please remember I am new and may need you to walk me through what to type in to get it):
Apple Mach-O Linker Error; Library not found for -lCocoaAsyncSocket; Linker command failed with exit code 1 (use -v to see invocation)
Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening <appName>.xcworkspace
I have tried the following based on my web research:
pod deintegrate && pod install
(I also updated pod to the latest)Other data that might be useful:
run-ios
command for the 20th time.react-native link <package> --platforms ios
whenever i install a 3P package.I would appreciate any help that can be provided and am happy to add in any detail needed (just please help me with how to get it).
Thanks in advance for any help you can provide!
Upvotes: 1
Views: 3056
Reputation: 53
This could happen if you are using react-native-vector-icons
and the "Legacy build system" in Xcode. Try to switch to the "New Build System" in your Xcode workspace: See here for details
Upvotes: 0
Reputation: 60
your problem might be from manual Linking, in react native new versions you don't have to run npm link, the link will be done automatically 'auto linking' in dependencies docs, you should see steps for auto linking which requires sometimes adding extra options in android and ios (pod file), try the following:
1- Unlink the module and all other linked modules:
npm unlink --no-save react-native-vector-icons
2- make sure that you added dependency in pod file (for all dependencies that requires this step):
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
3- delete node_modules and Re run both
npm install & pod install
Upvotes: 1