• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
including a cocoa bundle in a carbon app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

including a cocoa bundle in a carbon app


  • Subject: including a cocoa bundle in a carbon app
  • From: Bob Sabiston <email@hidden>
  • Date: Sun, 10 Aug 2008 12:38:02 -0500

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: including a cocoa bundle in a carbon app
      • From: Uli Kusterer <email@hidden>
    • Re: including a cocoa bundle in a carbon app
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: Re: Bindings array count to a label ( was Re: KVC beginners question )
  • Next by Date: Re: including a cocoa bundle in a carbon app
  • Previous by thread: Insert token at selection of NSTokenField?
  • Next by thread: Re: including a cocoa bundle in a carbon app
  • Index(es):
    • Date
    • Thread