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
I had this problem accessing 3rd party frameworks from my tests. Here's how I fixed it.
In Xcode goto: Your Unit-Test target > Build Phases > Link Binary With Libraries
In Finder goto: Carthage > Build > yourframework.Framework
Drag the framework in to your build phases then clean (cmd - shift - K).
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
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.
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
Try this process -
"Cmd + Shift + K"
or shift + cmd + alt + k
to clean up, and quit Xcode."rm -rf ~/Library/Developer/Xcode/DerivedData"
in terminalre-build
itThis 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.