本文介绍了CocaPods导入AFNetworking,但不导入OHAttributedLabel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用CocaPods将 AFNetowrking OHAttributedLabel 添加到我的项目中。我安装了两个库。 AFNetworking 在我的项目中可以正常导入。但是 OHAttributedLabel 不是。我不确定为什么!

I am using CocaPods to add AFNetowrking and OHAttributedLabel into my project. I installed both of the libraries. AFNetworking is importing just fine in my project. But OHAttributedLabel isn't. I am not sure why!

platform :ios, '6.0'
 
pod 'AFNetworking'
pod 'OHAttributedLabel'

在安装完两个库之后,当我导入

After installing both the libraries, when I import

#import "AFHTTPClient.h"
#import "AFJSONRequestOperation.h"
#import "UIImageView+AFNetworking.h"

我没有收到任何错误,一切都很好

I do not get any errors and everything works just fine

但是当我我正在尝试导入

but when I am trying to import

#import <OHAttributedLabel/OHAttributedLabel.h>
#import <OHAttributedLabel/NSAttributedString+Attributes.h>
#import <OHAttributedLabel/OHASBasicMarkupParser.h>

我正在

'OHAttributedLabel / OHAttributedLabel。找不到h'文件

错误

Resolving dependencies of `./Podfile'
Updating spec repositories

Cocoapods 0.17.0.rc7 is available.

Resolving dependencies for target `default' (iOS 6.0)
Downloading dependencies
Using AFNetworking (1.1.0)
Installing OHAttributedLabel (3.4.1)
Generating support files

建议

我不确定在哪里添加这个。这就是我的配置

I am not sure where to add this. This is how my configurations look like

复制pods.xcconfig

After copying pods.xcconfig

推荐答案

您似乎丢失了

您项目的信息应如下所示

You project's info should look like this

这篇关于CocaPods导入AFNetworking,但不导入OHAttributedLabel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 19:44