When we define a C structure in Objective-C with ARC support, we get the error "ARC forbids Objective-C objects in the structure." In this case, we need to use the keyword __unsafe_unretained.
Example
struct Books{
NSString *title;
NSString *author;
NSString *subject;
int book_id;
};
The correct way to use ARC enable in projects is:
struct Books{
__unsafe_unretained NSString *title;
__unsafe_unretained NSString *author;
__unsafe_unretained NSString *subject;
int book_id;
};
source
share