<p>I want to create a bundle from an arbitrary bundle identifier<br>
e.g. <code>com.apple.iokit.IOStorageFamily</code>  </p>

<p>It's not an unreasonable thing to do as bundle IDs are supposed<br>
to be unique, however the obvious code does not work:</p>

<pre><code>NSString* bID = @"com.apple.iokit.IOStorageFamily";
NSBundle* bundle = [NSBundle bundleWithIdentifier:bID];
</code></pre>

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

<p>Is this the state of the art or is there a more general way? </p>

Use this
```
```
NSString *path = [[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier:@"com.apple.TextEdit"];
```
```