Thanks for the fast and detailed response!
Makes total sense that KVO is meant to access properties only, but until now it was/is not forced for other methods than -copy.
If I extend my class and define a method like:
- (Sample *)notCrashing {
return [self copy];
}
and call it like [@[[Sample new]] valueForKey:@"notCrashing"]; it also returns a +1 ref count object, but it does not crash on iOS 17.
Or do I misunderstand?
Anyway I will change all places where KVC is used in that way before iOS 17 will be released to avoid crashes :-)
Topic:
App & System Services
SubTopic:
Core OS
Tags: