I have the following code and I am getting an exception with it.
-[_NSInlineData replaceBytesInRange:withBytes:]: unrecognized selector sent to instance 0x6000027ff2e0' terminating with uncaught exception of type NSException
Can someone point out the issue with this?
NSMutableData *data = [[NSMutableData alloc]
initWithLength:1000];
NSMutableData *d1 =(NSMutableData *) [data
subdataWithRange:NSMakeRange(sizeof(uint8_t),10)];
uint8_t i = 10;
[d1 replaceBytesInRange: NSMakeRange(1, sizeof(uint8_t)
withBytes:&i];