With my plugin, I need a way to retrieve the filePath of myself at runtime. I DO NOT know it in advance, as the bundles plist will be created, better don’t ask ![]()
In windows it’s easy, calling GetModuleFileName()
On macOS, using dladdr returns the path of the shared lib executable within a bundle. I could traverse the folder hierarchy up until I find a plist and read it, but there has to be a more elegant way for a shared library to obtain its own NSBundle???
Can I get the bundle with [NSBundle bundleForClass:[self class]], assuming I do this within my class? Or are there plugin format type specific JUCE classes Inheriting from nsobject? I assume the class ID is determined by bundleIdentifier.class, it won’t work otherwise, does it?
