Search code examples
objective-cxcodeios8cocoapodsxlform

XLForm Objective-C | Unknown property attribute 'nullable'


I installed cocoapods to my existing xcode application and added XLForm into it. I'm using Xcode version 6.2 and i'm developing the application using objective-c. And then when I try to run the project after installing the dependencies, it gives the following errors in the "XLFormSectionDescriptor.h" file.

How can I fix this? Any ideas?

Thanks in advance.

enter image description here


Solution

  • You should update to the latest version of Xcode, which is 7.1.1 as of the time of this post. If you have some reason that you cannot do this (such as not ready to compile against iOS 9 SDK), you have to get rid of the nonnull attribute in that code. Probably the simplest is to define it away.

    #define nonnull
    

    You probably should surround that with an #ifdef that checks compiler version. Someone more conversant than I am with the preprocessor will have to supply that bit of code.

    The errors are caused by introducing an attribute that the older version of clang included with Xcode 6.x does not understand.