Hello! I recently tried getting an iOS project running on Catalyst and one of the issues I came across was that FileSystemLoader couldn't load any template files on macOS (while it works fine on iOS). Looking at the implementation, the reason was clear: while iOS bundles put resources at the bundle root, macOS bundles put them in a Resources subdirectory, and FileSystemLoader.init(bundle:) doesn't use Bundle.resourcePath or Bundle.resourceURL so it was looking in the wrong place.
I'm happy to pass in resourceURL myself (or write my own lil BundleResourceLoader) but I figured I'd ask: would it be a useful contribution to adjust FileSystemLoader somehow to consider resourceURL, and/or to add a BundleResourceLoader? I can open a PR if that'd be useful. If not, I'm happy to go about my day :)
Hello! I recently tried getting an iOS project running on Catalyst and one of the issues I came across was that
FileSystemLoader
couldn't load any template files on macOS (while it works fine on iOS). Looking at the implementation, the reason was clear: while iOS bundles put resources at the bundle root, macOS bundles put them in aResources
subdirectory, andFileSystemLoader.init(bundle:)
doesn't useBundle.resourcePath
orBundle.resourceURL
so it was looking in the wrong place.I'm happy to pass in
resourceURL
myself (or write my own lilBundleResourceLoader
) but I figured I'd ask: would it be a useful contribution to adjustFileSystemLoader
somehow to considerresourceURL
, and/or to add aBundleResourceLoader
? I can open a PR if that'd be useful. If not, I'm happy to go about my day :)