ObjCRuntime.LinkWithAttribute Class
A LinkWith attribute specifies how the native library associated with the assembly should be linked to the resulting application.

See Also: LinkWithAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true)]
public sealed class LinkWithAttribute : Attribute

Remarks

This attribute is only useful for assemblies that bind to native libraries.

When using this attribute, the specified library in the constructor will be linked with the final application. You can use one or more of the properties of the attribute to configure how the linking is done.

c# Example

// The following is used to link with GoogleAdMobAds:

[assembly: LinkWith ("libGoogleAdMobAds.a", 
		     LinkTarget.Simulator | LinkTarget.ArmV7, 
		     ForceLoad = true, 
		     Frameworks = "AudioToolbox MessageUI SystemConfiguration CoreGraphics MediaPlayer StoreKit", 
		     WeakFrameworks = "AdSupport", 
		     IsCxx = true, 
		     SmartLink = true,
		     LinkerFlags = "-lz -lsqlite3")]
[assembly: LinkerSafe]

Requirements

Namespace: ObjCRuntime
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0