Skip to content

Commit 0c4f42b

Browse files
authored
Fix not automatically registered subclasses of built-in subclasses of PFObject. (#976)
1 parent 1908791 commit 0c4f42b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Parse/Internal/Object/Subclassing/PFObjectSubclassingController.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@ - (void)_registerSubclassesInBundle:(NSBundle *)bundle {
379379
// Scary, I know!
380380
for (Class kls = bundleClass; kls != nil; kls = class_getSuperclass(kls)) {
381381
if (kls == pfObjectClass) {
382-
// Do class_conformsToProtocol as late in the checking as possible, as its SUUUPER slow.
382+
// Do -conformsToProtocol: as late in the checking as possible, as its SUUUPER slow.
383383
// Behind the scenes this is a strcmp (lolwut?)
384-
if (class_conformsToProtocol(bundleClass, @protocol(PFSubclassing)) &&
385-
!class_conformsToProtocol(bundleClass, @protocol(PFSubclassingSkipAutomaticRegistration))) {
384+
if ([bundleClass conformsToProtocol:@protocol(PFSubclassing)] &&
385+
![bundleClass conformsToProtocol:@protocol(PFSubclassingSkipAutomaticRegistration)]) {
386386
[self _rawRegisterSubclass:bundleClass];
387387
}
388388
break;

0 commit comments

Comments
 (0)