ios – Xcode为注释的文本块中的特定单词提供错误

我在我的项目中使用Mantle来序列化对象.许多人使用该库,我确信错误与它们无关.当我包含Mantle.h或特别是MTL
JSONAdapter.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类中导入头.该类为空,但此处仅供参考:

据我所知,这个错误似乎源于编译器,因为编译器以某种方式解析注释块中的文本.但我以前从未经历过这种情况,可能是什么导致了这一点?

我在Yosemite上使用Xcode 6.3.我正在将Mantle与Cocoapods整合在一起,过去一直这样做,从未遇到过问题.不过我尝试删除所有内容并再次运行pod安装无济于事.

最佳答案 好的,我很傻.我使用的是
this配置文件,并将警告视为错误.我很少知道在该配置文件中也打开了文档警告,因此Xcode认为我试图给出一些文档标记.如果其他人遇到同样的问题,我会把它留在这里.

点赞