Auto-Linking framework not found

52,865

Solution 1

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.

Solution 2

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

Solution 3

I had this problem accessing 3rd party frameworks from my tests. Here's how I fixed it.

  1. In Xcode goto: Your Unit-Test target > Build Phases > Link Binary With Libraries

  2. In Finder goto: Carthage > Build > yourframework.Framework

  3. Drag the framework in to your build phases then clean (cmd - shift - K).

Solution 4

This can also be an error if you use a framework that has Bitcode Enabled on false. Bitcode Enabled can only be true if all frameworks also have Bitcode enabled true. Go to your targets build settings and disable bitcode.

Solution 5

For me this fixed it:

Go to Project > Targets > Build Settings (Tab) > Build Options (Heading)

Set Enable Testing Search Paths to Yes.

Instantly back up and running. Honestly not sure what this means but it worked.

Share:
52,865

Related videos on Youtube

domi852
Author by

domi852

Updated on November 01, 2021

Comments

  • domi852
    domi852 over 2 years

    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)

  • domi852
    domi852 about 6 years
    thanks a lot. it didn't help but I found that for some reason the Framework search paths in the app target were missing, I re-added them and it worked. issued closed and sorry for the trouble. //:configuration = Debug FRAMEWORK_SEARCH_PATHS = $(inherited) $(PROJECT_DIR)/Carthage/Build/iOS //:configuration = Release FRAMEWORK_SEARCH_PATHS = $(inherited) $(PROJECT_DIR)/Carthage/Build/iOS //:completeSettings = some FRAMEWORK_SEARCH_PATHS
  • Alexander Khitev
    Alexander Khitev almost 6 years
    @user3122959 you can write this like an answer
  • palme
    palme about 5 years
    Thanks user3122959 for the answer and @Alexander Khitev for the request to make it into a post. I tried to do that just now.
  • Jason
    Jason about 5 years
    I had this problem with a Pod (SQLite in this case), and had to add: "${PODS_CONFIGURATION_BUILD_DIR}/SQLite.swift"
  • Valentin Shamardin
    Valentin Shamardin over 4 years
    Damn yes! Thank you so much!
  • Andy Novak
    Andy Novak about 3 years
    I had $(inherited) in my Framework Search Paths, but the fix for me was to set $(inherited) to be recursive instead of non-recursive