How to include a bundle in main project xcode 4.1

Viewed 13102

[UPDATE 03/04/2015]

The question is now 4 years old, and applies to a specific version of XCode which I have now specified in the subject.


I have searched a lot for this argument, but I couldn't find a solution, I even post on stackoverflow, but I soon deleted the question becuase of very little access. Now I am trying again.

I have a workspace with two distinct projects A and B.

B has two targets, one that build a static library Blib.a, and one that build a bundle B.bundle. All of them get built in the derived directory.

In project A I can easily add the static library from the build phases. However I cannot find a way to include the bundle. B.bundle is not visible from "copy resource" tab in A. Therefore I need to add manually, with all that implies. I also thought about using a script, but I would like to use this as a very last option.

Has someone a solution for this ? Did I miss something ?

thanks

6 Answers
  1. Switch build to Generic iOS Device. This step is needed to create a non-simulator reference.
  2. Drag the .bundle to the other project's Copy Bundle Resources.
  3. Select the .bundle in the Project navigator of the other project, and change its Location to Relative to Build Products

Make sure your .bundle in added to Target Dependencies of your static library

Related