Cocoapods生成无效的伞头

时间:2016-04-22 09:13:53

标签: ios swift cocoapods

我正在使用以下存储库中的MDCSwipeToChooseView:

https://github.com/clsource/MDCSwipeToChoose

和Cocoapods生成一个伞形标题,如下所示:

#import <UIKit/UIKit.h>

#import "MDCSwipeToChoose.h"
#import "MDCSwipeOptions.h"
#import "MDCSwipeOptions.m"
#import "MDCSwipeToChooseViewOptions.h"
#import "MDCSwipeToChooseViewOptions.m"
#import "MDCPanState.h"
#import "MDCPanState.m"
#import "MDCSwipeDirection.h"
#import "MDCSwipeResult.h"
#import "MDCSwipeResult.m"
#import "MDCSwipeToChooseDelegate.h"
#import "MDCSwipeToChooseView.h"
#import "MDCSwipeToChooseView.m"
#import "UIView+MDCSwipeToChoose.h"
#import "UIView+MDCSwipeToChoose.m"

FOUNDATION_EXPORT double MDCSwipeToChooseVersionNumber;
FOUNDATION_EXPORT const unsigned char MDCSwipeToChooseVersionString[];

这是错误的,因为编译器说出以下内容:

compiler error

如果我手动删除所有.m导入,我可以编译代码,但每次再次运行pod installpod update时,它都会重新生成错误的标头。 我正在使用Swift,我在Podfile中启用了use_frameworks!

Cocoapod出了什么问题?我怎么能解决这个问题?

1 个答案:

答案 0 :(得分:0)

看起来MDCSwipeToChoose.podspec不正确。它列出了包含.h和.m文件的公共标题:

s.public_header_files = 'MDCSwipeToChoose/Public/**/*.{h,m}'

我猜它应该只是:

s.public_header_files = 'MDCSwipeToChoose/Public/**/*.h'

要求作者解决这个问题。或者分叉并修复你的副本。