File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Parse/Parse/Internal/Object/Subclassing Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -336,9 +336,21 @@ - (void)_registerSubclassesInLoadedBundle:(NSBundle *)bundle {
336336 return ;
337337 }
338338 // Filter out any system bundles
339- if ([bundle.bundlePath hasPrefix: @" /System/" ] || [bundle.bundlePath hasPrefix: @" /Library/ " ] || [bundle.bundlePath rangeOfString: @" iPhoneSimulator.sdk" ].location != NSNotFound ) {
339+ if ([bundle.bundlePath hasPrefix: @" /System/" ] || [bundle.bundlePath rangeOfString: @" iPhoneSimulator.sdk" ].location != NSNotFound ) {
340340 return ;
341341 }
342+
343+ // The Parse framework cannot be bundled with a macOS Command Line Application but needs to be
344+ // external to the application. The preferred file system location is '/Library/Frameworks'
345+ // and we don't want to filter out the Parse framework if it is installed there. See also:
346+ // https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/InstallingFrameworks.html#//apple_ref/doc/uid/20002261-97286
347+ if ([bundle.bundlePath hasPrefix: @" /Library/" ]) {
348+ if ([bundle.bundlePath hasPrefix: @" /Library/Frameworks/" ] && [[bundle.bundlePath lastPathComponent ] isEqualToString: @" Parse.framework" ]) {
349+ [self _registerSubclassesInBundle: bundle];
350+ }
351+ return ;
352+ }
353+
342354 [self _registerSubclassesInBundle: bundle];
343355}
344356
You can’t perform that action at this time.
0 commit comments