ios – Cocoapods框架无法在另一个Cocapods框架中找到文件

前端之家收集整理的这篇文章主要介绍了ios – Cocoapods框架无法在另一个Cocapods框架中找到文件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用通过 Cocoapods安装的库,它依赖于AFNetworking作为链接框架.安装库之后,我的项目将无法编译,因为无法找到导入的AFNetworking文件.

但是,似乎模块导致问题,因为如果我从

#import“AFHTTPRequestOperationManager.h”

#import< AFNetworking / AFHTTPRequestOperationManager.h>

..错误消失.我宁可不去改变这些链接库中的代码,那么如何让我的库成功地找到AFNetworking文件

编辑这是我的podfile:

  1. # Uncomment this line to define a global platform for your project
  2. # platform :ios,'6.0'
  3.  
  4. source 'https://github.com/CocoaPods/Specs.git'
  5. use_frameworks!
  6. platform :ios,'8.0'
  7.  
  8. target 'Motospot' do
  9.  
  10. pod 'Alamofire','~> 1.2'
  11. pod 'youtube-ios-player-helper','~> 0.1.1'
  12. pod 'BDBOAuth1Manager'
  13.  
  14. end
  15.  
  16. target 'MotospotTests' do
  17.  
  18. end

解决方法

请检查配置文件 – AFNetworking版本

改成

  1. pod 'AFNetworking','~> 2.5.4'

并使用

  1. #import "AFHTTPRequestOperationManager.h"

猜你在找的iOS相关文章