File tree Expand file tree Collapse file tree
Sources/BluetoothExplorerPluginEngine Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,7 +76,10 @@ public enum PluginLoader {
7676
7777 /// Scan a bundle's `Plugins/` directory for `*.bleplugin.json` manifests and load each.
7878 public static func loadBundled( from bundle: Bundle ) -> ( loaded: [ LoadedPlugin ] , failures: [ PluginLoadFailure ] ) {
79- let manifestURLs = bundle. urls ( forResourcesWithExtension: " json " , subdirectory: " Plugins " ) ?? [ ]
79+ // `urls(forResourcesWithExtension:subdirectory:)` yields `[URL]` on Darwin but `[NSURL]` on
80+ // Android's Foundation, so normalize before touching path components.
81+ let discovered = bundle. urls ( forResourcesWithExtension: " json " , subdirectory: " Plugins " ) ?? [ ]
82+ let manifestURLs : [ URL ] = discovered. map { $0 as URL }
8083 var loaded = [ LoadedPlugin] ( )
8184 var failures = [ PluginLoadFailure] ( )
8285 for url in manifestURLs where url. lastPathComponent. hasSuffix ( " .bleplugin.json " ) {
You can’t perform that action at this time.
0 commit comments