添加我自己的框架后未找到框架错误



我正在尝试使用本指南学习框架流程:https://www.raywenderlich.com/126365/ios-frameworks-tutorial。创建了一个单独的cocoa框架项目,将一些代码移到了那里 - 它成功构建,从而产生了DehancerNavigation.framework文件。

现在我正在尝试将此框架添加到另一个项目中:刚刚为此创建了一个空白项目,并将我的框架添加到">常规">选项卡中的"嵌入式二进制文件"中。它也出现在链接框架和库部分。

添加了框架的"常规"选项卡

似乎足够了,但现在我收到一个构建时错误:

ld/users/yefim/library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Products/Debug/DehancerNavigationTestUsageProject.app/Content/MacOS/DehancerNavigationTestUsageProject Normal x86_64

cd/Users/yefim/Documents/Projects/DehancerNavigationTestUsageProject

导出 MACOSX_DEPLOYMENT_TARGET=10.13

/Applications/Xcode.app/Content/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot/Applications/Xcode.app/Content/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -L/Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Products/Debug -f/Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Products/Debug -filelist/Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Intermediates.noindex/DehancerNavigationTestUsageProject.build/Debug/DehancerNavigationTestUsageProject.build/Objects-normal/x86_64/DehancerNavigationTestUsageProject.LinkFileList -Xlinker -rpath -Xlinker @executable_path/../Frameworks -mmacosx-version-min=10.13 -Xlinker -object_path_lto -Xlinker/Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Intermediates.noindex/DehancerNavigationTestUsageProject.build/Debug/DehancerNavigationTestUsageProject.build/Objects-normal/x86_64/DehancerNavigationTestUsageProject_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-link-runtime -L/Applications/Xcode.app/Content/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -Xlinker -add_ast_path -Xlinker/Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Intermediates.noindex/DehancerNavigationTestUsageProject.build/Debug/DehancerNavigationTestUsageProject.build/Objects-normal/x86_64/DehancerNavigationTestUsageProject.swiftmodule -framework DehancerNavigation -Xlinker -dependency_info -Xlinker/Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Intermediates.noindex/DehancerNavigationTestUsageProject.build/Debug/DehancerNavigationTestUsageProject.build/Objects-normal/x86_64/DehancerNavigationTestUsageProject_dependency_info.dat -o/Users/yefim/Library/Developer/Xcode/DerivedData/DehancerNavigationTestUsageProject-eqegtcmqsajracgiyxgidupllvbp/Build/Products/Debug/DehancerNavigationTestUsageProject.app/Content/MacOS/DehancerNavigationTestUsageProject

ld:未找到框架 DehancerNavigation

clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用(。

我还需要设置其他内容才能在项目中使用框架吗?

当我将框架复制到我的项目文件夹而不是引用它时,问题解决了(如果需要,应该设置检查器,请复制项目(。

最新更新