I'm just learning Objective-C, so this is going to be a pretty basic question. I've created a Mac OSX Cocoa Application and added it to a Workspace in XCode 4.
I also created a Cocoa Framework project named "Module" and added it to the same Workspace. By default XCode created a Module.h and Module.m for me which I've left unchanged.
I've seen lots of articles about how to add the framework to the project by going into the Build Phase and clicking the + in the "Link Binary With Libraries" section. I've done this and now see a toolbox in my main Application project that says "Module.Framework"
So now my next question is - how do I #import that into my main app? I tried various combinations using " and <, but all attempts report as file not found.
Help? :)
EDIT: Added some screen shots
Furthermore, Objective-C is a piece of art, creators packed genius solutions and were constantly improving it, so us developers were able to use it at our advantage. There are a lot of indicators telling us there's still a ton of legacy Objective-C code, both from Apple and from other developers, that's still in use.
If Swift succeeds, Objective-C will go away. It won't be deprecated, but it'll move to Florida to enjoy its golden years.
You really can't use C in Objective-C, since Objective-C is C. The term is usually applied when you write code that uses C structures and calls C functions directly, instead of using Objective-C objects and messages.
As long as Module.framework is in your project (your main project, not the other project), you should be able to use #import <Module/Module.h>
. Also, make sure you have set up a dependency so Xcode knows to build your framework before trying to build the main project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With