Incompatible pointer types initializing 'OrderItems *_Strong ' with an expression of type NSSet.
It's pretty straightforward. You almost seem to know. The problem is:
Product *prod = [self.fetchedResultsController objectAtIndexPath:indexPath];
OrderItems *order=prod.product;
You're assigning a value to a pointer of type OrderItems
, and the thing you're assigning is prod.product
. But what's that? It's an NSSet
:
@property (nonatomic, retain) NSSet *product;
That's why you get that message. You have a pointer to NSSet
and you're trying to assign it to a pointer to OrderItems
. I don't know what OrderItems
is, but it's not an NSSet
. You can make that assignment, but you can't expect it to work properly.
I have done the same way in different program but I don't know really why.
Either you did things differently in other apps, or you got the same message there that you're getting here.