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

问题描述 投票:2回答:5

我使用xcode 8进行开发,使用cocoapods 1.0.1进行框架。安装框架后,我无法构建我的项目。我收到“ld:framework not found”错误。我在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
ios cocoapods swift3 ios10 xcode8
5个回答
0
投票

发生此错误有两个原因

  1. 我遇到了同样的问题,这只是由于pod文件中的更改或者pod文件可能不存在,请仔细检查pod文件并运行cmd pod安装
  2. 成功安装pod文件后,如果你得到这个 错误请重新启动Xcode,错误消失
© www.soinside.com 2019 - 2024. All rights reserved.