我正在使用xcode 6.3,swift 1.2并使用cocoapods安装“JSQMessagesViewController”库。这是我的pod文件:
pod 'JSQMessagesViewController'
和我的桥文件:
#import <JSQMessagesViewController/JSQMessages.h>
然后我收到错误:
'JSQMessagesViewController/JSQMessages.h' file not found with <angled> include; use "quotes" instead
我不知道为什么会出错。当我用
更新桥文件时 #import "JSQMessagesViewController/JSQMessages.h"
我收到错误
JSQMessagesViewController/JSQSystemSoundPlayer+JSQMessages.h:19:9: 'JSQSystemSoundPlayer/JSQSystemSoundPlayer.h' file not found with <angled> include; use "quotes" instead
这真让我感到困惑,因为错误是在JSQMessagesViewController的源代码中,我无法修改。我用Google搜索了一天,没有办法解决它。 由于JSQMessagesViewController库在githup中如此受欢迎,我相信必须有人知道如何修复它。
答案 0 :(得分:5)
您使用了表示法的表示法。您使用0.36或更高版本的cocoapods?然后你可以通过将它放在你的pod文件中来建立一个来自JSQMessagesViewController的框架:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'JSQMessagesViewController'
答案 1 :(得分:4)
我遇到了这个问题,我正在使用Xcode7,swift 2,iOS 9,使用cocoapods版本0.38.2,解决它的是从#import <JSQMessagesViewController/JSQMessages.h>
文件中删除Bridging-Header.h
的声明。
然后将其导入您要在其中使用的类。
import UIKit
import JSQMessagesViewController
class MessageViewController: JSQMessagesViewController {
}
如果您使用use_frameworks,可以使用Cocoapods 0.36!进入Podfile(就像Eric D说的那样,然后cocoapods会创建你所包含的任何Pod的框架。
答案 2 :(得分:3)
答案 3 :(得分:-1)
对我而言,它使用了这个Podfile:
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
pod 'JSQMessagesViewController'
创建桥头。
(iOS 9,xCode 7,cocoapods 0.39.0)