【发布时间】:2015-09-07 19:40:21
【问题描述】:
我有一个使用 Obj-C cocoapods 的 swift 项目,但每当我构建时,由于 setBackgroundImageForState 和 setImageForState 的标识符未解析而失败。
我的 Podfile 包含:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.1'
pod 'AFNetworking'
pod 'AnimatedGIFImageSerialization'
pod 'TTTAttributedLabel'
pod 'JTSImageViewController'
pod 'JSQMessagesViewController'
我已经运行pod install。
我的桥接文件包含:
#import <AFNetworking/AFNetworking.h>
#import <AFNetworking/UIKit+AFNetworking.h>
#import "TTTAttributedLabel/TTTAttributedLabel.h"
#import "JTSImageViewController/JTSImageViewController.h"
#import <JSQMessagesViewController/JSQMessages.h>
并且在项目设置中正确链接。
知道为什么会这样吗?谢谢。
【问题讨论】:
-
嗯,你检查导入失败的地方了吗?
-
@AlexBartiş 我不确定我明白你在问什么。这并不是说导入失败。我假设导入甚至从未发生过。
-
是的,对不起,我写错了。我的意思是构建失败的地方。我看到那些是 AFNetworking 方法,所以我想 afnetworking 要么没有完全/正确安装,要么可能是构建目标有问题?您可以尝试使用此 github.com/kylef/cocoapods-deintegrate 插件来卸载所有 pod 并进行清理,然后重试在您的 pod 上运行 pod install。
-
@Wiz 出于好奇,您最终是如何解决这个问题的?
标签: objective-c swift cocoapods