diff --git a/Info.plist b/Info.plist
index 4f650ef..0d2c9cc 100644
--- a/Info.plist
+++ b/Info.plist
@@ -22,9 +22,9 @@
CFBundlePackageType
APPL
CFBundleVersion
- 1
+ 2
CFBundleShortVersionString
- 0.1
+ 0.1.1
LSMinimumSystemVersion
14.0
LSUIElement
diff --git a/Sources/uppod/Theme.swift b/Sources/uppod/Theme.swift
index 9ca55a2..a6e7050 100644
--- a/Sources/uppod/Theme.swift
+++ b/Sources/uppod/Theme.swift
@@ -31,16 +31,23 @@ enum Theme {
}
}
-/// Loads a bundled PNG by name, trying the packaged `.app` bundle first, then the SwiftPM module
-/// bundle (dev / `swift run`). Centralizes the dual-lookup that the UI used to repeat per call site.
+/// Loads a bundled PNG by name. Release `.app` builds use `Bundle.main`; debug SwiftPM runs can
+/// fall back to `Bundle.module`.
enum AppImage {
static func png(_ name: String) -> NSImage? {
- for bundle in [Bundle.main, Bundle.module] {
- if let url = bundle.url(forResource: name, withExtension: "png"),
- let image = NSImage(contentsOf: url) {
- return image
- }
+ if let image = png(name, in: Bundle.main) {
+ return image
}
+ #if DEBUG
+ if let image = png(name, in: Bundle.module) {
+ return image
+ }
+ #endif
return nil
}
+
+ private static func png(_ name: String, in bundle: Bundle) -> NSImage? {
+ guard let url = bundle.url(forResource: name, withExtension: "png") else { return nil }
+ return NSImage(contentsOf: url)
+ }
}