From 27b5dc4a3b31c8da1910fd79da2d54f3e652d3f8 Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 6 Mar 2013 08:57:57 +0000 Subject: [PATCH] AU class bundle fix. --- modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm index 36d32a078c..82c9eb7285 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm @@ -261,13 +261,12 @@ public: static JuceUICreationClass cls; - const File bundleFile (File::getSpecialLocation (File::currentApplicationFile)); - NSString* bundlePath = [NSString stringWithUTF8String: (const char*) bundleFile.getFullPathName().toUTF8()]; - NSBundle* b = [NSBundle bundleWithPath: bundlePath]; + // (NB: this may be the host's bundle, not necessarily the component's) + NSBundle* bundle = [NSBundle bundleForClass: cls.cls]; AudioUnitCocoaViewInfo* info = static_cast (outData); info->mCocoaAUViewClass[0] = (CFStringRef) [juceStringToNS (class_getName (cls.cls)) retain]; - info->mCocoaAUViewBundleLocation = (CFURLRef) [[NSURL fileURLWithPath: [b bundlePath]] retain]; + info->mCocoaAUViewBundleLocation = (CFURLRef) [[NSURL fileURLWithPath: [bundle bundlePath]] retain]; return noErr; }