Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-Linking framework not found

Tags:

I have forked a framework called BTNavigationDropdownMenu (swift project for ios). all worked fine till I tried to add a dependency to the latest version in the branch I created. the problem is the same whether I add the other framework (DYBadge) through a podfile or through Carthage.

Auto-Linking framework not found DYBadge.

It seems to have a problem with a UIView extension that is part of DYBadge.

DYBadge works fine in my main app I'm working on (I also need it in the app target).

errors below. thanks for any hints into the right direction.

ld: warning: Auto-Linking framework not found DYBadge Undefined symbols for architecture x86_64: "(extension in DYBadge):__ObjC.UIView.getBadge() -> DYBadge.DYBadge?", referenced from: Demo.BTNavigationDropdownMenu.updateBadge(text: Swift.String, at: Swift.Int) -> () in BTNavigationDropdownMenu.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

like image 963
domi852 Avatar asked Apr 11 '18 06:04

domi852


2 Answers

Xcode is not able to find your frameworks because the FRAMEWORK_SEARCH_PATHS is probably not set or is wrong (happened to me because I moved the Info.plist file).

You can fix this by going into your target and adapt the Build Settings. Simply search in there for FRAMEWORK_SEARCH_PATHS and add the correct one, which is usually $(PROJECT_DIR)/Carthage/Build/iOS (for iOS projects). $(inherited) should also be in there as the first entry.

This is the post of @user3122959 answer in the comments, which helped me and others to fix this problem and was requested to put in as the answer to this question.

like image 181
palme Avatar answered Sep 28 '22 05:09

palme


Try this process -

  1. Press "Cmd + Shift + K" or shift + cmd + alt + k to clean up, and quit Xcode.
  2. Delete the cache Run "rm -rf ~/Library/Developer/Xcode/DerivedData" in terminal
  3. Open the project and re-build it
like image 40
Md Rashed Pervez Avatar answered Sep 28 '22 05:09

Md Rashed Pervez