A simple Swift class has a field of type var Array. When the class is adapted to Objective-C the field type is exposed as NSArray (immutable) while it should be NSMutableArray (mutable)
class Categoryy: NSObject {
var items = Array<Item>()
}
The Categoryy swift class is adapted to Objective-C in the Xcode-generated header MODULE_NAME-swift.h file as following:
SWIFT_CLASS("_TtC8waiterio9Categoryy")
@interface Categoryy : NSObject
@property (nonatomic, copy) NSArray * items;
- (instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
is there a way for the var items : Array field to be converted to a mutable NSMutableArray in Objective-c?