nstudio / nativescript-checkbox

NativeScript plugin for checkbox UI component
Other
119 stars 56 forks source link

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

Open monkeymonk opened 6 years ago

monkeymonk commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

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 commented 5 years ago

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 commented 4 years ago

Does anyone find the solution ?

Whip commented 4 years ago
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 commented 4 years ago

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 commented 4 years ago

@flipperlite Solved the problem. Thanks!