Skip to content
This repository was archived by the owner on May 3, 2026. It is now read-only.

Commit 510ab22

Browse files
committed
fix: detect modern KVO runtime subclasses
1 parent d775bea commit 510ab22

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/InterposeKit/InterposeKit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ final public class Interpose {
5252

5353
// This is based on observation, there is no documented way
5454
private func isKVORuntimeGeneratedClass(_ klass: AnyClass) -> Bool {
55-
NSStringFromClass(klass).hasPrefix("NSKVO")
55+
String(cString: class_getName(klass)).contains("NSKVONotifying_")
5656
}
5757

5858
/// Initializes an instance of Interpose for a specific class.

0 commit comments

Comments
 (0)