mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
use resourceURL for locating bundled web reader web resources
This commit is contained in:
parent
43a20abcd5
commit
e48a3027f6
2 changed files with 5 additions and 4 deletions
|
|
@ -322,10 +322,7 @@ import WebKit
|
|||
)
|
||||
.styledContent
|
||||
|
||||
// webView.loadFileURL(ViewsPackage.bundleURL, allowingReadAccessTo: ViewsPackage.bundleURL)
|
||||
// macOS isn't loading the resources at the baseURL here for some reason
|
||||
// maybe it needs the `allowingReadAccessTo` permission?
|
||||
webView.loadHTMLString(htmlString, baseURL: ViewsPackage.bundleURL)
|
||||
webView.loadHTMLString(htmlString, baseURL: ViewsPackage.resourceURL)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,4 +5,8 @@ public enum ViewsPackage {
|
|||
public static var bundleURL: URL {
|
||||
Bundle.module.bundleURL
|
||||
}
|
||||
|
||||
public static var resourceURL: URL {
|
||||
Bundle.module.resourceURL ?? bundleURL
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue