我Mantle
在我的项目中使用序列化对象。该库被许多人使用,我确信错误与它们无关。当我包含Mantle.h
或明确MTLJSONAdapter.h
包含在注释中的文本块时,它会给出一些不相关的错误MTLJSONAdapter.h
这是MTLJSONAdapter.h
发生错误的屏幕截图:
文本块是:
/// A value transformer that should be used for a properties of the given
/// primitive type.
///
/// If `objCType` matches @encode(id), the value transformer returned by
/// +transformerForModelPropertiesOfClass: is used instead.
///
/// The default implementation transforms properties that match @encode(BOOL)
/// using the MTLBooleanValueTransformerName transformer.
///
/// objCType - The type encoding for the value of this property. This is the type
/// as it would be returned by the @encode() directive.
///
/// Returns a value transformer or nil if no transformation should be used.
我得到的错误是:
#import <Mantle/Mantle.h>
删除线时没有错误。BaseModel
我按照图书馆的建议在我的班级中导入标题。该类是空的,但这里仅供参考:
据我所知,这个错误似乎源于编译器,因为编译器以某种方式解析了注释块中的文本。但是我从来没有遇到过这种情况,可能是什么原因造成的?
我在使用 Xcode 6.3 的优胜美地。我正在与 集成Mantle
,Cocoapods
并且过去一直这样做并且从未遇到过问题。尽管如此,我尝试擦除所有内容并pod install
再次运行无济于事。