I'm using Mantle
in my project to serialize objects. The library is used by many and I'm sure the errors are not related to them. When I include Mantle.h
or specifically MTLJSONAdapter.h
it gives some unrelated errors for a block of text that's wrapped in comments in MTLJSONAdapter.h
this is the screenshot of the MTLJSONAdapter.h
where errors happen:
The block of text is:
/// 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.
and the errors I get are these:
There are no errors when I remove the #import <Mantle/Mantle.h>
line. I import the header in my BaseModel
class as suggested by the library. The class is empty, however here it is for reference:
As far as I can understand, this error seems to stem from the compiler since the compiler somehow parses the text within comment blocks. But I've never experienced this before, what might be causing this?
I'm on Yosemite with Xcode 6.3. I'm integrating Mantle
with Cocoapods
, and have always done so in the past and never encountered problems. Nevertheless I tried erasing everything and running pod install
again to no avail.
Ok, I'm silly. I was using this configuration file, and treating warnings as errors. Little did I know that documentation warnings too are turned on in that configuration file, so Xcode thought I was trying to give a documentation tag to something. I'll leave this here if anyone else encounters the same problem.