3 Replies Latest reply: Mar 16, 2011 4:36 PM by psksvprv2
WindozeVista Level 1 Level 1
Maybe it's a stupid question, but I really cannot get it to work.

I've 2 projects, one is an application, the other is a framework, ultimately I want a test.app bundle with the framework embedded, which used to be very easy in Xcode 3.
Here is what I've tried.
1. Add 2 projects into a workspace
2. In "Summary" page of app project, "Linked Frameworks and Libraries" panel, press '+' button and I can pick the framework target from the framework project
3. Just like in Xcode 3, I added a new "Copy File" build phase in "Build Phases" page, change "Destination" to "Frameworks"
4. Press '+' button, now only app project folder appears, and there is a framework file
5. Choose this framework file, then build the app

Then build failed with the error message "error: /Users/chen/Documents/Projects/testworkspace/testapp/testframework.framework: No such file or directory"

I went through Xcode 4 user guide and found no articles about how to embed framework.

Can anyone help?

MacBook Pro, Mac OS X (10.5.6)
  • etresoft Level 7 Level 7
    The frameworks are present in your "Other frameworks" group of your application, correct? Try dragging them from there into the copy task.

    I have a very similar project and I think I may have had the same problem. It works fine now.
  • WindozeVista Level 1 Level 1
    Works like a charm.

    Looks I shouldn't pick the framework by pressing '+' button, just drag the framework target from framework project then everything works.

    Thanks a lot.
  • psksvprv2 Level 1 Level 1

    I have similar setup like your set. I have an app with bunch of .framework and .bundle. And want to copy them into app bundle. I did use drag and drop like your, but only the debug build get copy in there, no matter I did a release and debug build of my APP.