OGeek|极客世界-中国程序员成长平台

标题: ios - ld : framework not found error in xcode 8 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 12:07
标题: ios - ld : framework not found error in xcode 8

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

# 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



Best Answer-推荐答案


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

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

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

编辑: 如果这不是问题,请转到您的示例目标/常规/链接框架和库

你应该只有一个名字应该是这样的ods_Sample.framework

如果您只使用 cocoa pod 来安装框架,那么它应该是唯一的一个,因为它包含所有 pod 。

关于ios - ld : framework not found error in xcode 8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39661296/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4