In most cases this is done automagically for you.
E.g. when you use a type from MonoTouch.CoreGraphics
, like CGColor
, then the tooling will add a reference to the CoreGraphics
framework. No further action is required from you.
The only time when you need to manually specify frameworks is when you link with a native library that has dependencies on some framework(s) that your application itself might now have.
In general, when you create bindings to an Objective-C library, you add such requirements inside the [LinkWith]
attribute. E.g.
[assembly: LinkWith ("libX.a", LinkTarget.Simulator, Frameworks="CoreGraphics")]
You can add several frameworks by separating them with a space.
You can also use the Additional mtouch arguments (from your Project Options) to specify options to the native linker if you do not use a binding project, e.g.
-gcc_flags="-framework CoreGraphics"