Auto-Linking framework not found

前端 未结 8 1305
春和景丽
春和景丽 2021-01-17 08:31

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

相关标签:
8条回答
  • 2021-01-17 09:12

    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).

    0 讨论(0)
  • 2021-01-17 09:15

    If you are using Carthage and several Projects within one Workspace you have to add a symlink to your Main Carthage Folder. it will depend what structure you have, but for example if you have

    Project -> Carthage

    Project -> Frameworks -> MyImbaFramework than cd in terminal in MyImbaFramework folder and run

    ln -s ../../Carthage Carthage

    0 讨论(0)
  • 2021-01-17 09:18

    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.

    0 讨论(0)
  • 2021-01-17 09:18

    In my case, there was an issue with Bitcode, but Xcode couldn't give an accurate error diagnostic since the project framework references were also somehow messed up. Running the framework tests worked fine, but archiving gave the auto-linking error.

    Deleted all framework references from the project, including the Frameworks group they were under, added them back again resolved the references issue, then I got the bitcode issue, which I disabled on the target framework, then and only then, archiving was successful

    0 讨论(0)
  • 2021-01-17 09:20

    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
    0 讨论(0)
  • 2021-01-17 09:33

    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.

    0 讨论(0)
提交回复
热议问题