Based on this forum post, I have the following code, to try to load a plugin description, to load an instance of it.
auto typesFound = juce::OwnedArray<juce::PluginDescription>();
const juce::String plugin = "/Library/Audio/Plug-Ins/VST3/<plugin>.vst3";
const juce::StringArray filenames = {plugin};
auto knownPlugins = juce::KnownPluginList();
auto formatManager = juce::AudioPluginFormatManager();
formatManager.addDefaultFormats();
knownPlugins.scanAndAddDragAndDroppedFiles(formatManager, {plugin}, typesFound);
However, the code is not able to find the plugin:
auto numTypes = typesFound.size(); // = 0
auto description = knownPlugins.getTypeForFile(plugin); // = nullptr
What is wrong with this code? I tried it on Linux as well as Mac, and it had the same result.