…he was riding into the sunset with the cry, “It’s time to try it out for real!”
The good news: after spending lots of time converting my application to the two-framework setup I talked about in my I’ve Been Framed! post, I have it working again.
The bad news: I continued having problems even after I solved the ones I talked about in my Looks Can Be Deceiving post.
Now, a lot of this is because I decided, as long as I was embedding my own frameworks, in addition I would try to embed the Omni frameworks I was also using. Not only embed those frameworks, but also put dependencies on those framework projects in my own project, so everything would always get built correctly.
Using that setup, I kept getting strange compilation errors that would go away or change after each clean rebuild. Undefined symbol errors, code logic compilation errors that only showed up after the third rebuild, inability to find the embedded frameworks. You name it.
In general, my advice is: keep fiddling with it, you’ll get it to work eventually. But don’t expect a cakewalk.
Specifically, about the app framework setup:
main.c*/m*must be in the app itself. All other code can be in the app framework.
- MainMenu.nib must be in the app itself. All other nibs can be in the app framework.
- The Finder icons for the application and any of its documents must be in the app itself.
2. means that you may need to put a few tests in the app itself, not just in the tests framework, if you want to test something in MainMenu.nib.
And specifically, about the Omni frameworks:
- Add the Omni projects to your project and use the framework references within those projects – don’t also add the frameworks to your project under the Frameworks group.
- I found no way around modifying the Omni projects themselves to have an
INSTALL_PATHof “@executable_path/../Frameworks”. It would be nice if you didn’t have to touch those projects at all for this purpose, but it looks like you do.
- You must link the Omni frameworks to both your app framework and the app itself, or you may get linker errors.
- As I warn in my Don’t Use the Brown Project File post, at this time, you really really should use the
*.pbprojversions of the Omni projects, not the