views:

119

answers:

1

Hi there,

how do I create a bundle with resources like images and xibs to share it between apps? I saw that there's a way to do it when creating a new project, but there must be a way to do it based on a finished project, right?

Thanks in advance
–f

+2  A: 

On iPhoneOS the bundle structure is very simple. Just a make folder and put all the resources under it.

blah.bundle/
  foo.png
  bar.png
  baz.nib
  ...

But apps are sandboxed so the same bundle must be copied into each app.

KennyTM
Ok, cool. But how do I reference it when it comes to methods like `–initWithNibName:bundle:` where I want to use `NSBundle`s `-bundleWithIdentifier:`?
flohei
@flohei: You can use `+bundleWithPath:`.
KennyTM
Oh. Yay, thank you! :)
flohei