nativescript-checkbox
nativescript-checkbox copied to clipboard
"linker command failed with exit code 1" when building from XCode
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! :-)
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.
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. :-)
@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/
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 ? :-)
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
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 :
Does anyone find the solution ?
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
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
@flipperlite Solved the problem. Thanks!