Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 410253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:52:14+00:00 2026-05-12T17:52:14+00:00

I want to create a bundle from an arbitrary bundle identifier e.g. com.apple.iokit.IOStorageFamily It’s

  • 0

I want to create a bundle from an arbitrary bundle identifier
e.g. com.apple.iokit.IOStorageFamily

It’s not an unreasonable thing to do as bundle IDs are supposed
to be unique, however the obvious code does not work:

NSString* bID = @"com.apple.iokit.IOStorageFamily";
NSBundle* bundle = [NSBundle bundleWithIdentifier:bID];

This code only works for bundles you’ve already loaded
(hello, chicken and egg problem), and in fact, you have
to know a little more than you’d like about the the identifier
before you can do anything. For the above style of ID
I grep out the final component and tranform it into
/System/Library/Extensions/IOStorageFamily.kext
which I then load by path.

Is this the state of the art or is there a more general way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:52:14+00:00Added an answer on May 12, 2026 at 5:52 pm

    Just recently Andrew Myrick answered a similar question on the darwin-dev mailing list:

    KextManagerCreateURLForBundleIdentifier()
    in <IOKit/kext/KextManager.h> may be
    of use, though I believe it only works
    for kexts that are either 1) loaded,
    or 2) in /S/L/E/. Here is the Snow
    Leopard headerdoc:

    /*!
     * @function KextManagerCreateURLForBundleIdentifier
     * @abstract Create a URL locating a kext with a given bundle identifier.
     *
     * @param    allocator
     *           The allocator to use to allocate memory for the new object.
     *           Pass <code>NULL</code> or <code>kCFAllocatorDefault</code>
     *           to use the current default allocator.
     * @param    kextIdentifier
     *           The bundle identifier to look up.
     *
     * @result
     * A CFURLRef locating a kext with the requested bundle identifier.
     * Returns <code>NULL</code> if the kext cannot be found, or on error.
     *
     * @discussion
     * Kexts are looked up first by whether they are loaded, second by version.
     * Specifically, if <code>kextIdentifier</code> identifies a kext
     * that is currently loaded,
     * the returned URL will locate that kext if it's still present on disk.
     * If the requested kext is not loaded,
     * or if its bundle is not at the location it was originally loaded from,
     * the returned URL will locate the latest version of the desired kext,
     * if one can be found within the system extensions folder.
     * If no version of the kext can be found, <code>NULL</code> is returned.
     */
    CFURLRef KextManagerCreateURLForBundleIdentifier(
        CFAllocatorRef allocator,
        CFStringRef    kextIdentifier);
    

    Note that prior to Snow Leopard, it
    may only work for kexts in /S/L/E; the
    API existed, but there was no
    headerdoc describing its behavior.

    For me this worked really well on Mac OS X 10.5.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a Java application bundle for Mac without using Mac. According
I want to create a number of masked edit extenders from codebehind. Something like:
I want to create a settings page from within my app that looks exactly
I want to create layout programmatically in different class which is not an activity
I want create a drop shadow around the canvas component in flex. Technically speaking
I want to create a client side mail creator web page. I know the
I want to create a function that performs a function passed by parameter on
I want to create a simple http proxy server that does some very basic
I want to create a draggable and resizable window in JavaScript for cross browser
I want to create an allocator which provides memory with the following attributes: cannot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.