Skip to content

Commit 3674219

Browse files
committed
[CHANGE] 10.4 compatiblity: only use -[NSBundle loadAndReturnError:] when it's available.
1 parent a51e80c commit 3674219

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

SparkleManager.m

+6-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ - (SUUpdater*)_updater {
7171
NSAssert(sparkleFramework, nil);
7272

7373
NSError *error = nil;
74-
BOOL loaded = [sparkleFramework loadAndReturnError:&error];
74+
BOOL loaded;
75+
if ([sparkleFramework respondsToSelector:@selector(loadAndReturnError:)]) {
76+
loaded = [sparkleFramework loadAndReturnError:&error];
77+
} else {
78+
loaded = [sparkleFramework load];
79+
}
7580
if (loaded) {
7681
NSBundle *clickToFlashBundle = [NSBundle bundleWithIdentifier:@"com.github.rentzsch.clicktoflash"];
7782
NSAssert(clickToFlashBundle, nil);

0 commit comments

Comments
 (0)