In iOS, you can add frameworks when you go to "Your Project" =>"Targets" => "Build Phases"
and then press the add button to add frameworks.
So, lets say I wanted to add CoreVideo framework
, CoreMedia framework, and CoreGraphics.framework. How can I add these frameworks to my Xamarin iOS
project?
I am new to Xamarin iOS. thanks for reading, I appreciate any comments or suggestions.
In most cases this is done automagically for you.
Eg 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. Eg
[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, eg
-gcc_flags="-framework CoreGraphics"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.