I want to update XCode version.
But while updating I receive several compiler errors. The are the same as this:
id<MyProtocol> objectToDelete = group[index.unsignedIntegerValue];
Expected method to read array element not found on object of type 'id'
id<MyProtocol> _Nonnull group
@protocol MyProtocol <NSObject>
@property (copy, nonatomic) NSString* name;
@property (copy, nonatomic) NSString* id;
@property (copy, nonatomic) NSString* internalType;
@property (strong, nonatomic) NSMutableArray<id<SomeAnotherProtocol>>* objects;
- (instancetype)initWithObject:(MyProtocol*)object;
// Search
- (BOOL)isContainsObjectWithID:(NSString*)myID;
- (NSUInteger)indexForObjectID:(NSString*)myID;
- (id<SomeAnotherProtocol>)objectWithID:(NSString*)myID;
- (NSString*)groupID;
@end
This error appears only on XCode 9.3 version.
Does id<MyProtocol> objectToDelete = ((NSArray *) group)[index.unsignedIntegerValue];
the only solution?