On occasion, I build and use private frameworks. But because I don't do it regularly, I always forget some steps. With Xcode 4, a few things have changed as well. So here is a small "how to" which might benefit you as well. And a question as well at the end. 
As you probably know, code can be part of an application or a framework. The advantage of a framework is that it can be used in multiple projects/applications.
Start a new application project. In the project navigator, select your new app (the blue icon) and click "add target" in the main editor view. Select "cocoa framework" and give it an unique name. Click "finish".
There are now two targets listed in the top left part of the main editor. Your app and your framework. Select your app target and go to "build phases". In the "link binary with libraries" panel, you add your newly created framework. It's located in the group named after your project. Now, it's part of your app. Also add your framework in the "target dependencies" panel. If you make any changes to your framework, your framework will automatically be compiled before your application to include the latest version of your framework.
Now add some objective-c files to your project. Just like you would normally do (cmd-n, or from the file menu). Before saving your new .m (and .h) file, make sure you select the right target to which to file is added. Add some files to either targets. The .m files will appear in the "compile sources" panel of your target (i.e. the app or the framework). Feel free to add some code to these files to make them do something interesting (suggestion: have a class "MyClass" in your framework print out a statement "hello Macrumors").
Now go back to the "build phases" panel of your framework. (To get there: first select the blue project icon in the project navigator). Besides the "target dependencies" and "link binary with libraries" panels, you also see a "copy headers" panel. Headers mentioned in this panel will be copied into your final product (i.e. your app or framework bundle). If you want to make use of any of the classes in your framework, it's important to make the headers of those classes public. So, go ahead, and make those classes public (suggestion: make "MyClass.h" public).
These public headers can now be used outside of your framework, provided that the framework is included into your application. To do so, add an import statement in a class of your application: #import "yourFrameworkName/MyClass.h"
Go ahead and alloc & init an instance of "MyClass.h" or any other class you might have added. Have it do something interesting such as greeting Macrumors.com.
Select your framework in the toolbar of XCode. It's in the path control, situated next to the run and stop buttons on the lefthand side. Build your framework. Running your app won't do much, though. After the build has succeeded, select and build your app. Run your app and see if it does what you think it would do.
Because your framework is a target dependency for your app, any changes made in your framework should also make it through to your app. Go back into any of your framework classes and change something (but don't break your code). (suggestion: change the print statement in "MyClass" to "hello Apple").
Don't compile your framework yourself, but directly compile your application. Because your app directly depends on your framework, Xcode should compile your framework automatically.
What I have described so far works great if your app and framework are both in a single Xcode project. Suppose you want to have your framework in its own Xcode project. Or suppose it's already part of an app in one project, but you want to add it to a second app in a different Xcode project. Well, let's add our framework to a second app.
Create a new project with a cocoa app. Again, go to the "build phases" of your app and click the "+" in the "link binary with libraries" panel. Click "add other" to go to on open panel. Where you have to go now, depends on your Xcode preferences. Either you go to "/user/library/developer/xcode/deriveddata/" or to your own folder with build products. Anyway, locate the build folder for your framework project. If you can't find your build folder, do this trick. Run your first app (the one with the framework) and right click on the dock icon. In the options menu, select "show in finder". Your framework appears as a folder rather than a bundle. When adding your framework to a Xcode project, select the folder with .framework extension. It should now be listed in the "link binary with libraries" panel.
Although your app is not yet directly depended on your framework, it's linked against it. So go ahead and compile & run your app. You should get an error now saying that if can't find your framework. The culprit is your framework. Go to the first Xcode project that contains the framework source code and select the "build settings" of your framework target. Type "installation directory" in the search bar. You will find "/Library/Frameworks" for both the debug and release versions of your framework. This means that your app expects to find your framework in that exact location. But your framework is actually located in your build folder. Remember when you add to look for it when adding it to your second app/project?
There are two solutions. One is to copy your framework into that destination. This is recommended by Apple if your framework is part of multiple applications. That is want all those application installers do: coping frameworks and other resources to their correct destination. For a framework in development, this is rather tedious to do after each compilation.
Instead, as the second solution, your framework will be copied into your application bundle. This requires two steps.
First step is editing the "installation directory" in the build settings of your framework. Replace "/Library/Frameworks" by "@executable_path/../Frameworks". "@executable_path" represents the file location of the binary file of your app.
The second step occurs in the your second Xcode project (i.e. app number 2 that also wants to use your framework). Go to the "build phases" panel of your "app number 2" target. In the bottom right of the main editor, you see the "add build phase" button. Click on it and select "Add Copy files" from the popup menu. A new panel will appear above, which you will open. What a "copy files" build phase does, is copy the specified files into your application bundle. Useful to know if you want to add icons, images, templates, etc to your application. Anyway, for a framework, you select "Frameworks" as destination and you add the framework to the panel. If you now build your app and inspect the contents of the appellation bundle, you'll find a folder "Frameworks" that contains your framework. Running your app should now work.
One thing is still missing in the second Xcode project. It has no direct dependencies on the framework. If you edit your framework, XCode will not automatically compile your framework when you build and run your second app.
In previous versions of Xcode, you could drag and drop your framework project onto your app project to make the app project aware of the framework project. Once the app project knows about your framework, you could add a direct dependency. However, this doesn't seem to work anymore. Drag and drop still works and a new blue Xcode icon appears, but it can't be added to the direct dependencies and the imported project won't show any of its classes. So, how can you make one project aware of the other project?
I hope you have found this little how-to useful.
As you probably know, code can be part of an application or a framework. The advantage of a framework is that it can be used in multiple projects/applications.
Start a new application project. In the project navigator, select your new app (the blue icon) and click "add target" in the main editor view. Select "cocoa framework" and give it an unique name. Click "finish".
There are now two targets listed in the top left part of the main editor. Your app and your framework. Select your app target and go to "build phases". In the "link binary with libraries" panel, you add your newly created framework. It's located in the group named after your project. Now, it's part of your app. Also add your framework in the "target dependencies" panel. If you make any changes to your framework, your framework will automatically be compiled before your application to include the latest version of your framework.
Now add some objective-c files to your project. Just like you would normally do (cmd-n, or from the file menu). Before saving your new .m (and .h) file, make sure you select the right target to which to file is added. Add some files to either targets. The .m files will appear in the "compile sources" panel of your target (i.e. the app or the framework). Feel free to add some code to these files to make them do something interesting (suggestion: have a class "MyClass" in your framework print out a statement "hello Macrumors").
Now go back to the "build phases" panel of your framework. (To get there: first select the blue project icon in the project navigator). Besides the "target dependencies" and "link binary with libraries" panels, you also see a "copy headers" panel. Headers mentioned in this panel will be copied into your final product (i.e. your app or framework bundle). If you want to make use of any of the classes in your framework, it's important to make the headers of those classes public. So, go ahead, and make those classes public (suggestion: make "MyClass.h" public).
These public headers can now be used outside of your framework, provided that the framework is included into your application. To do so, add an import statement in a class of your application: #import "yourFrameworkName/MyClass.h"
Go ahead and alloc & init an instance of "MyClass.h" or any other class you might have added. Have it do something interesting such as greeting Macrumors.com.
Select your framework in the toolbar of XCode. It's in the path control, situated next to the run and stop buttons on the lefthand side. Build your framework. Running your app won't do much, though. After the build has succeeded, select and build your app. Run your app and see if it does what you think it would do.
Because your framework is a target dependency for your app, any changes made in your framework should also make it through to your app. Go back into any of your framework classes and change something (but don't break your code). (suggestion: change the print statement in "MyClass" to "hello Apple").
Don't compile your framework yourself, but directly compile your application. Because your app directly depends on your framework, Xcode should compile your framework automatically.
What I have described so far works great if your app and framework are both in a single Xcode project. Suppose you want to have your framework in its own Xcode project. Or suppose it's already part of an app in one project, but you want to add it to a second app in a different Xcode project. Well, let's add our framework to a second app.
Create a new project with a cocoa app. Again, go to the "build phases" of your app and click the "+" in the "link binary with libraries" panel. Click "add other" to go to on open panel. Where you have to go now, depends on your Xcode preferences. Either you go to "/user/library/developer/xcode/deriveddata/" or to your own folder with build products. Anyway, locate the build folder for your framework project. If you can't find your build folder, do this trick. Run your first app (the one with the framework) and right click on the dock icon. In the options menu, select "show in finder". Your framework appears as a folder rather than a bundle. When adding your framework to a Xcode project, select the folder with .framework extension. It should now be listed in the "link binary with libraries" panel.
Although your app is not yet directly depended on your framework, it's linked against it. So go ahead and compile & run your app. You should get an error now saying that if can't find your framework. The culprit is your framework. Go to the first Xcode project that contains the framework source code and select the "build settings" of your framework target. Type "installation directory" in the search bar. You will find "/Library/Frameworks" for both the debug and release versions of your framework. This means that your app expects to find your framework in that exact location. But your framework is actually located in your build folder. Remember when you add to look for it when adding it to your second app/project?
There are two solutions. One is to copy your framework into that destination. This is recommended by Apple if your framework is part of multiple applications. That is want all those application installers do: coping frameworks and other resources to their correct destination. For a framework in development, this is rather tedious to do after each compilation.
Instead, as the second solution, your framework will be copied into your application bundle. This requires two steps.
First step is editing the "installation directory" in the build settings of your framework. Replace "/Library/Frameworks" by "@executable_path/../Frameworks". "@executable_path" represents the file location of the binary file of your app.
The second step occurs in the your second Xcode project (i.e. app number 2 that also wants to use your framework). Go to the "build phases" panel of your "app number 2" target. In the bottom right of the main editor, you see the "add build phase" button. Click on it and select "Add Copy files" from the popup menu. A new panel will appear above, which you will open. What a "copy files" build phase does, is copy the specified files into your application bundle. Useful to know if you want to add icons, images, templates, etc to your application. Anyway, for a framework, you select "Frameworks" as destination and you add the framework to the panel. If you now build your app and inspect the contents of the appellation bundle, you'll find a folder "Frameworks" that contains your framework. Running your app should now work.
One thing is still missing in the second Xcode project. It has no direct dependencies on the framework. If you edit your framework, XCode will not automatically compile your framework when you build and run your second app.
In previous versions of Xcode, you could drag and drop your framework project onto your app project to make the app project aware of the framework project. Once the app project knows about your framework, you could add a direct dependency. However, this doesn't seem to work anymore. Drag and drop still works and a new blue Xcode icon appears, but it can't be added to the direct dependencies and the imported project won't show any of its classes. So, how can you make one project aware of the other project?
I hope you have found this little how-to useful.