mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Support getting app icon from asset catalog
This commit is contained in:
1 parent
eac4522817
commit
238fd42bb3
1 file changed
+6
Vendored
+6
@@ -22,6 +22,12 @@
|
||||
NSURL *iconURL = [SUBundleIcon iconURLForHost:host];
|
||||
|
||||
NSImage *icon = (iconURL == nil) ? nil : [[NSImage alloc] initWithContentsOfURL:iconURL];
|
||||
|
||||
// Get icon from asset catalog if no explicit filename is provided.
|
||||
if (!icon) {
|
||||
icon = [host.bundle imageForResource:@SPARKLE_ICON_NAME];
|
||||
}
|
||||
|
||||
// Use a default icon if none is defined.
|
||||
if (!icon) {
|
||||
// this asumption may not be correct (eg. even though we're not the main bundle, it could be still be a regular app)
|
||||
|
||||
Reference in new issue
Block a user