问题
Error:
Ld DerivedData/SenseWatch/Build/Products/Debug-iphonesimulator/SenseWatch.app/SenseWatch normal x86_64
cd /Users/Jieyi/Documents/Repo/SenseWatch
export IPHONEOS_DEPLOYMENT_TARGET=9.0
export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -L/Users/Jieyi/Documents/Repo/SenseWatch/DerivedData/SenseWatch/Build/Products/Debug-iphonesimulator -F/Users/Jieyi/Documents/Repo/SenseWatch/DerivedData/SenseWatch/Build/Products/Debug-iphonesimulator -filelist /Users/Jieyi/Documents/Repo/SenseWatch/DerivedData/SenseWatch/Build/Intermediates/SenseWatch.build/Debug-iphonesimulator/SenseWatch.build/Objects-normal/x86_64/SenseWatch.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.0 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -framework MicrosoftBandKit_iOS -Xlinker -dependency_info -Xlinker /Users/Jieyi/Documents/Repo/SenseWatch/DerivedData/SenseWatch/Build/Intermediates/SenseWatch.build/Debug-iphonesimulator/SenseWatch.build/Objects-normal/x86_64/SenseWatch_dependency_info.dat -o /Users/Jieyi/Documents/Repo/SenseWatch/DerivedData/SenseWatch/Build/Products/Debug-iphonesimulator/SenseWatch.app/SenseWatch
ld: framework not found MicrosoftBandKit_iOS
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I just created the project, added the framework in build phases. the framework is clearly under the project. but it still says not found. i know that it may needs to finish framework search path. but i don't understand how to? like put in the absolute path for the framework?
回答1:
no absolute path is bad way, it only work in your computer, not work with your partner. Set relative path is best way. To set path for framework:
be sure framework locate in project folder
select target -> Build Setting -> Search Path-> Framework Search Paths. Double click it will show an Search Paths input text view
in Finder go to folder content framework. Drag this folder to search paths input text view. it will be some thing like "$(SRCROOT)/Vendors/FacebookSDK"
just remove double qoute "", result: $(SRCROOT)/Vendors/FacebookSDK
done!
回答2:
http://stationinthemetro.com/2014/06/04/copy-file-path-as-text-in-mac-os-x i use this and copy the absolute path and put it under framework search path and it works
来源:https://stackoverflow.com/questions/30744761/framework-not-found-microsoftbandkit-ios