ld:在xcode 8中找不到框架错误

编程入门 行业动态 更新时间:2024-10-21 18:56:42
本文介绍了ld:在xcode 8中找不到框架错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我将xcode 8用于开发,将cocoapods 1.0.1用于框架。安装框架后,我无法构建项目。我收到 ld:找不到框架错误。我在pod文件中使用了以下行:

I am using xcode 8 for development and cocoapods 1.0.1 for frameworks. After installing frameworks, i couldn't able to build my project. I am getting "ld: framework not found" error. I am using following lines in pod file:

# Uncomment this line to define a global platform for your project platform :ios, '9.0' target 'Sample' do use_frameworks! pod 'MBProgressHUD', '~> 0.9' pod 'TPKeyboardAvoiding', '~> 1.2' pod 'SDWebImage', '~> 3.7' pod 'UIActivityIndicator-for-SDWebImage' pod 'UITextView+Placeholder', '~> 1.2' pod 'Alamofire', '~> 4.0' end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '3.0' end end end

推荐答案

在安装框架之后,您是否关闭了项目并打开了新创建的工作区?

After installing the frameworks, did you closed your project and opened the newly created workspace?

一旦开始使用CocoaPods安装框架,则必须使用工作空间,因为它包含您的Sample项目和包含框架的Pod项目。

Once you start using CocoaPods to install framework, you must use the workspace as it includes your Sample project and the Pod project containing the frameworks.

在项目目录中,请确保打开.xcworkspace而不是.xcodeproj。

In you project directory, make sure to open the .xcworkspace instead of .xcodeproj.

编辑:如果不是问题,请转到样本目标/常规/链接框架和库

If that is not the issue, go to your Sample target/General/Linked Framework and Librairies

您应该只使用一个名称如下的名称:Pods_Sample .framework

You should only have one that should be name something like: Pods_Sample.framework

如果您仅使用可可豆荚来安装框架,那么它应该是那里唯一的框架,因为它包括所有豆荚。

If you are only using cocoa pods to install frameworks it should be the only one there as it includes all the pods.

更多推荐

ld:在xcode 8中找不到框架错误

本文发布于:2023-11-26 06:58:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1633099.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中找   框架   错误   ld   xcode

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!