Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
566 views
in Technique[技术] by (71.8m points)

ios - Auto-Linking framework not found

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)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...