I have been stretching my head from two days to solve this issue.
I have created iOS universal framework which contains my model classes derived from JSONModel. For example,
@protocol XYZ
@end
@interface XYZ : JSONModel
@property(nonatomic,strong) NSString * name;
@end
Now, whenever I use this "Framework" in other project and try to initialize "XYZ" model class with dictionary,
NSError* err = nil;
XYZ * xyz = [[XYZ alloc] initWithDictionary:jsonDictionary error:&err];
it crashes saying "Bad property protocol declaration".
It is working fine if I do not use framework and put those model class directly in my project. Don't know why such a wired behavior.
I have been looking badly for solution from two days and lots of waste of time. I can see this issue is also raised in github but no any answer from developers. It is very frustrating and even I can't drop JSONModel at this very mature stage of my project. I am having so many model classes and very complex structures that I cannot switch to another library.
Please. Any help would be greatly appreciated. Thank you in advance.