Hi,

I got my Cocoa bundle to compile on the Intel machine. It still doesn't load within my app, though. Is there something special I need to do to include it in my project? I just dragged it in on the left, amongst all the other types of files, and it gave me a menu of targets from which I selected the correct one. But the load is still failing. I'm using the function below, gotten from Apple's examples. Anyone know what could be the problem? CFBundleCreate is just setting bundlePtr to 0, I don't know why.

This bundle works when compiled in Xcode 2.4.1 on a G5 and then included in a Codewarrior project. But I haven't gotten it to work with the same project on Intel in Xcode yet. It is probably something simple that I'm missing.

Thanks for any suggestions!
Bob


void myLoadPrivateFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr)
{
    CFBundleRef appBundle = NULL;
    CFURLRef baseURL = NULL;
    CFURLRef bundleURL = NULL;

    appBundle = CFBundleGetMainBundle();
    require(appBundle, CantFindMainBundle);

    baseURL = CFBundleCopyPrivateFrameworksURL(appBundle);
    require(baseURL, CantCopyURL);

bundleURL = CFURLCreateCopyAppendingPathComponent(kCFAllocatorSystemDefault, baseURL, framework, false);
    require(bundleURL, CantCreateBundleURL);

    *bundlePtr = CFBundleCreate(NULL, bundleURL);

    CFRelease(bundleURL);
CantCreateBundleURL:
    CFRelease(baseURL);
CantCopyURL:
CantFindMainBundle:
    return;
}

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to