Re: Cocoa bundle
Re: Cocoa bundle
- Subject: Re: Cocoa bundle
- From: Art Gillespie <email@hidden>
- Date: Sun, 1 Mar 2009 10:11:27 -0700
>From "CFBundle.h":
/* Note that this does not search for bundles on the disk; it will locate */
/* only bundles already loaded or otherwise known to the current process. */
Instead you could get the AU's CFBundleRef then use
CFBundleCopyResourceURLInDirectory(CFURLRef bundleURL, CFStringRef
resourceName, CFStringRef resourceType, CFStringRef subDirName);
and
CFBundleRef CFBundleCreate(CFAllocatorRef allocator, CFURLRef bundleURL);
to get your Cocoa bundle's CFBundleRef.
If you create a project from the 'AU Effect with Cocoa UI' template
in Xcode, there's code that does this in
<ProjectName>.cpp::GetProperty
Best,
Art
On Sun, Mar 1, 2009 at 9:16 AM, john smith <email@hidden> wrote:
>
> Hi,
>
> I'm trying to create a cocoa UI for my AU code, but the C++ part seems
> unable to locate the bundle... The following code returns 0:
>
> CFBundleRef bundle = CFBundleGetBundleWithIdentifier(
> CFSTR("com.phonoxone.cocoaui") );
>
>
> I placed my cocoa bundle inside my AU, in the resources directory. It has a
> bundle identifier, which is "com.phonoxone.cocoaui".
>
> As I understood it, that should be enough for the call to return non-zero.
> Obviously I'm missing something.
>
> Any ideas?
>
>
> Thanks in advance,
>
> Michael Olsen
>
>
>
>
> ________________________________
> What can you do with the new Windows Live? Find out
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden