diff --git a/Parse/Parse/Internal/Object/Subclassing/PFObjectSubclassingController.m b/Parse/Parse/Internal/Object/Subclassing/PFObjectSubclassingController.m index 07f6adba3..affbaec9a 100644 --- a/Parse/Parse/Internal/Object/Subclassing/PFObjectSubclassingController.m +++ b/Parse/Parse/Internal/Object/Subclassing/PFObjectSubclassingController.m @@ -357,7 +357,18 @@ - (void)_registerSubclassesInLoadedBundle:(NSBundle *)bundle { - (void)_registerSubclassesInBundle:(NSBundle *)bundle { PFConsistencyAssert(bundle.loaded, @"Cannot register subclasses in an unloaded bundle: %@", bundle); - const char *executablePath = bundle.executablePath.UTF8String; + [self _registerSubclassesInExecutablePath:bundle.executablePath]; + +#if defined(DEBUG) && DEBUG + if (bundle == [NSBundle mainBundle]) { + NSString *executablePath = [NSString stringWithFormat:@"%@.debug.dylib", bundle.executablePath]; + [self _registerSubclassesInExecutablePath:executablePath]; + } +#endif +} + +- (void)_registerSubclassesInExecutablePath:(NSString *)exePath { + const char *executablePath = exePath.UTF8String; if (executablePath == NULL) { return; }