Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"linker command failed with exit code 1" when building from XCode #97

Open
monkeymonk opened this issue Sep 17, 2018 · 10 comments
Open

Comments

@monkeymonk
Copy link

This error appears when building from XCode:

ld: warning: directory not found for option '-F/Users/lambda/Library/Developer/Xcode/DerivedData/dist-aicmjkgjwnnaczajminirkrtrqmo/Build/Products/Debug-iphoneos/BEMCheckBox'
ld: framework not found BEMCheckBox
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I use nativescript-cli and nativescript-vue. When I run tns plugin add nativescript-checkbox it returns Plugin "nativescript-checkbox" is already installed..

Podfile look like this:

use_frameworks!

target "dist" do
# Begin Podfile - /...path to project.../dist/node_modules/nativescript-checkbox/platforms/ios/Podfile 
 pod 'BEMCheckBox', '~> 1.4.1'
 
 # End Podfile 

end

I really don't know how to make it work. Any help will be much appreciated! :-)

@EddyVerbruggen
Copy link
Contributor

Have you tried removing the platforms/ios folder after adding the plugin? That will force a rebuild of the native project upon the next tns run ios. Then look for any Pod-related errors in the log in case the problem persists.

@monkeymonk
Copy link
Author

Hello @EddyVerbruggen,

I have tried to run npm run clean && npm run build:ios but not luck.
I've succeeded using cd dist && tns prepare ios --release.

I guess then that the issue is more related to nativescript-cli, nativescript-vue or nativescript itself.

This issue is solved for me. :-)

@rigor789
Copy link
Member

@monkeymonk you may want to upgrade to the latest cli-template. The project structure is significantly simpler, and should generally work a lot better with different plugins. We've added an upgrade guide to the docs, and in most cases it shouldn't take more than 10-20 minutes. https://nativescript-vue.org/en/docs/getting-started/upgrade-guide/

@monkeymonk
Copy link
Author

Thank you @rigor789, I will consider this. It seems cleaner but I can't find where the main.js path is setup (need to update that path). Any clue ? :-)

@rigor789
Copy link
Member

I'm not sure what you are looking for, please hop on the nativescript community slack - it's faster and easier to figure things out there! https://developer.telerik.com/wp-login.php?action=slack-invitation

@on-meetsys
Copy link

I have the very same error (without using nativescript-vue). The application is compiled from command line, but the compilation fails from Xcode. As told, I've removed the /platforms first and made a fresh build.
Cf :
capture d ecran 2019-01-28 a 13 53 33

@toams69
Copy link

toams69 commented Jun 16, 2020

Does anyone find the solution ?

@Whip
Copy link

Whip commented Jun 24, 2020

tns platform clean ios
tns prepare ios

solved the problem for me. I opened the workspace again after running above 2 commands. Then let it index and run Product > Archive. It worked

@flipperlite
Copy link

Here's what worked for me. After running tns prepare ios and tns build ios --release, it will create Xcode files in your_project/platforms/ios. Make sure you open the your_project.xcworkspace and NOT the your_project.xcodeproj. Then you can build or archive your app without the error ld: framework not found BEMCheckBox

@rkJun
Copy link

rkJun commented Jul 21, 2020

@flipperlite Solved the problem. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants