0
我已经安装了firebase和导入框架的pods,并尽了一切可能......但我仍然得到这种使用undeclare'firebase'的错误。
进口的UIKit 进口JSQMessagesViewController 进口火力地堡在ios中使用未声明的类型'firebase'
class ChatViewController: JSQMessagesViewController {
var ref: Firebase
@IBOutlet weak var blackBtn: UIButton!
@IBOutlet weak var menuView: UIView!
@IBOutlet weak var TypeTxt: UITextField!
var messages = [JSQMessage]()
var outgoingBubbleImageView: JSQMessagesBubbleImage!
var incomingBubbleImageView: JSQMessagesBubbleImage!
override func viewDidLoad() {
super.viewDidLoad()
ref = Firebase(url: "https://candleheart-6bee6.firebaseio.com/")
// var ref = Firebase(url:"https://fir-example-fea13.firebaseio.com/names")
// ref.setValue(["name":"mamta"])
// title = "ChatChat"
setupBubbles()
collectionView!.collectionViewLayout.incomingAvatarViewSize = CGSizeZero
collectionView!.collectionViewLayout.outgoingAvatarViewSize = CGSizeZero
// messageRef = rootRef.childByAppendingPath("messages")
TypeTxt.layer.cornerRadius = 22.0
TypeTxt.layer.borderWidth = 2.0
TypeTxt.layer.borderColor = UIColor.whiteColor().CGColor
TypeTxt.layer.backgroundColor = UIColor.whiteColor().CGColor
}
是的,我已经做了所有这些事情。 – aarti
@aarti您是否将框架文件拖到您的项目中?只是好奇 –
你不应该拖动任何文件到项目。只需在podfile中提及pod并在终端中使用pod install即可。没有别的。也清理并在之后建立。 –