xamarin-macios/src
Rolf Bjarne Kvinge cc5a1ea94e
[CFHTTPAuthentication] Indirectly subclass NativeObject + numerous other code updates (#13107)
* The base class CFType now subclasses NativeObject, so we can remove a lot of unnecessary code.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Remove the internal (IntPtr) constructor.
2021-10-26 08:27:23 +02:00
..
ARKit [ObjCRuntime] Add nullability attributes to the Runtime class + numerous other code updates. (#13021) 2021-10-19 08:11:45 +02:00
AVFoundation [Netcore] Remove warning from extra using. (#12777) 2021-09-20 16:38:41 -04:00
AVKit [avkit] Add nullability for manual bindings (#10150) 2020-11-25 20:40:04 -05:00
Accelerate [src] Adapt some code to work with both C#'s nint/nuint and our custom System.nint/System.nuint types (#13019) 2021-10-19 08:12:20 +02:00
Accessibility [Accessibility] Update bindings for Xcode 13.0 beta 1 (#11998) 2021-07-07 17:25:31 -04:00
Accounts [accounts] Add nullability for manual bindings (#10161) 2020-11-30 09:55:07 -05:00
AdSupport [catalyst][adsupport] Update xtro - framework is not available (#11625) 2021-05-20 09:30:55 -04:00
AddressBook [ABRecord] Subclass NativeObject + numerous other code updates (#13085) 2021-10-25 10:57:24 +02:00
AddressBookUI [AddressBook] Add Support for DotNet Attributes (#12564) 2021-08-30 11:41:35 -04:00
AppKit [AppKit] Update Xcode 13.0 bindings for betas 1,2,3,4,5 2021-10-05 11:59:49 -04:00
AssetsLibrary [AssetsLibrary] Add Support for DotNet Attributes 2021-09-07 14:11:48 -05:00
AudioToolbox [.NET/AudioToolbox] Make AudioServicesAddSystemSoundCompletion take an unmanaged function pointer instead of delegate. Very partial fix for #10470. (#12920) 2021-10-05 07:23:14 +02:00
AudioUnit [.NET/AudioUnit] Use [UnmanagedCallersOnly] instead of [MonoPInvokeCallback] for the ScheduledAudioFileRegionCallback function. (#12948) 2021-10-08 07:58:22 +02:00
AuthenticationServices [AuthenticationServices] Add Support for DotNet Attributes (#12705) 2021-09-13 19:06:59 -04:00
BackgroundTasks Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
BusinessChat [d16-7] [src] Remove Classic code from the CoreBluetooth, CoreAudioKit, CoreAnimation, ContactsUI, Contacts, CloudKit, ClassKit, CFNetwork, CarPlay, CallKit and BusinessChat frameworks. (#8784) 2020-06-05 13:08:51 -04:00
CFNetwork [CFHTTPAuthentication] Indirectly subclass NativeObject + numerous other code updates (#13107) 2021-10-26 08:27:23 +02:00
CallKit Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
CarPlay [CarPlay] Add Support for DotNet Attributes 2021-09-08 10:42:16 -04:00
Carbon
ClassKit Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
ClockKit Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
CloudKit [CloudKit] Add Support for DotNet Attributes (#12672) 2021-09-09 23:00:49 -05:00
Compression [dotnet] Add `[Uns|S]upportedOSPlatformAttribute` to manual bindings (part 1) (#11230) 2021-04-16 15:05:02 -04:00
Contacts Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
CoreAnimation [ObjCRuntime] Add nullability attributes to the Runtime class + numerous other code updates. (#13021) 2021-10-19 08:11:45 +02:00
CoreBluetooth [CoreBluetooth] Add Support for DotNet Attributes 2021-09-09 12:17:41 -04:00
CoreData [dotnet] Add `[Uns|S]upportedOSPlatformAttribute` to manual bindings (part 1) (#11230) 2021-04-16 15:05:02 -04:00
CoreFoundation [Policy] Subclass NativeObject + numerous other code updates (#13108) 2021-10-26 08:22:56 +02:00
CoreGraphics [CGColorSpace] Subclass NativeObject + numerous other code updates (#13089) 2021-10-26 08:19:52 +02:00
CoreHaptics [CoreHaptics] Add support for Xcode13 beta1. (#11963) 2021-06-17 15:15:07 -04:00
CoreImage [generator] Use '[U]IntPtr' in P/Invoke signatures instead of 'n[u]int'. (#13043) 2021-10-25 10:56:02 +02:00
CoreLocation [CoreLocation] Add Support for DotNet Attributes (#12623) 2021-09-07 14:27:38 -05:00
CoreML [generator] Use '[U]IntPtr' in P/Invoke signatures instead of 'n[u]int'. (#13043) 2021-10-25 10:56:02 +02:00
CoreMedia [CMBufferQueue] Subclass NativeObject + numerous other code updates (#13074) 2021-10-22 09:22:44 +02:00
CoreMidi [MidiThruConnection] Numerous other code updates (#13008) 2021-10-19 15:51:34 +02:00
CoreMotion [CoreMotion] Add Support for DotNet Attributes 2021-09-13 19:01:23 -04:00
CoreServices [FSEvents] Fix compiler warning about nullability. (#13050) 2021-10-20 22:23:17 +02:00
CoreSpotlight [CoreSpotlight] Add Support for DotNet Attributes 2021-09-08 10:30:40 -04:00
CoreTelephony [generator] Do not inline duplicate attributes when processing protocols (#10683) 2021-03-01 08:39:52 -05:00
CoreText [src] Adapt some code to work with both C#'s nint/nuint and our custom System.nint/System.nuint types (#13019) 2021-10-19 08:12:20 +02:00
CoreVideo [ObjCRuntime] Add nullability attributes to the Runtime class + numerous other code updates. (#13021) 2021-10-19 08:11:45 +02:00
CoreWlan [CoreWLAN] Updates for Catalyst 2021-10-21 16:03:25 -04:00
Darwin
EventKit [EventKit] Updates for Xcode13 Beta1 (#12022) 2021-07-01 18:25:58 -05:00
EventKitUI [EventKitUI] Add Support for DotNet Attributes (#12625) 2021-09-07 14:32:37 -05:00
ExternalAccessory Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
FileProvider [FileProvider] Add Support for DotNet Attributes (#12593) 2021-09-02 12:11:48 -04:00
FinderSync Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
Foundation [generator] Use '[U]IntPtr' in P/Invoke signatures instead of 'n[u]int'. (#13043) 2021-10-25 10:56:02 +02:00
GLKit [Tests] Fix cecil tests. (#12853) 2021-09-28 08:09:23 -04:00
GameController [Tests] Fix cecil tests. (#12853) 2021-09-28 08:09:23 -04:00
GameKit [GameKit] Add Support for DotNet Attributes (#12704) 2021-09-13 19:05:57 -04:00
GameplayKit [GameplayKit] Add Support for DotNet Attributes (#12621) 2021-09-07 14:26:45 -05:00
HealthKit [ObjCRuntime] Add nullability attributes to the Runtime class + numerous other code updates. (#13021) 2021-10-19 08:11:45 +02:00
HomeKit [HomeKit] Add Support for DotNet Attributes 2021-08-30 11:44:15 -04:00
IOSurface [xcode12.2][intro] check for duplicate or inconsistent availability attributes (#9825) (#9856) 2020-10-14 13:57:14 -04:00
ImageCaptureCore [ImageCaptureCore] Add ImageCaptureCore Bindings (#5074) 2018-11-07 09:52:39 -05:00
ImageIO [ImageIO] Add Support for DotNet Attributes 2021-08-30 11:47:38 -04:00
ImageKit [macos][imagekit] Update for Xcode 11 beta 1 (#6772) 2019-08-14 22:06:24 -04:00
InputMethodKit
Intents [Intents] Update bindings for Xcode 13.0 betas 1 through 5 (#12771) 2021-09-21 20:30:56 -04:00
JavaScriptCore [d16-7] [src] Remove Classic code from the JavaScriptCore, MapKit, MediaLibrary, MediaToolbox, Metal, MetalKit, MetalPerformanceShaders, MobileCoreServices, ModelIO, MultipeerConnectivity, NetworkExtension and NotificationCenter frameworks. (#8806) 2020-06-10 09:29:53 +02:00
LocalAuthentication [LocalAuthentication] Add support for Xcode 13 beta 4. (#12301) 2021-08-02 16:59:52 -04:00
MLCompute [MLCompute] Add support for Xcode 13 beta 4. (#12348) 2021-08-05 01:02:27 -04:00
MapKit Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
MediaAccessibility [generator] Use new `CFArray.StringArrayFromHandle` instead of the existing `NSArray` API (#12368) 2021-08-06 09:17:48 -04:00
MediaLibrary [d16-7] [src] Remove Classic code from the JavaScriptCore, MapKit, MediaLibrary, MediaToolbox, Metal, MetalKit, MetalPerformanceShaders, MobileCoreServices, ModelIO, MultipeerConnectivity, NetworkExtension and NotificationCenter frameworks. (#8806) 2020-06-10 09:29:53 +02:00
MediaPlayer [MediaPlayer] Add Support for DotNet Attributes (#12538) 2021-08-27 12:18:04 -04:00
MediaToolbox [MediaToolbox] Add Support for DotNet Attributes (#12716) 2021-09-13 22:25:40 -05:00
MessageUI Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
Metal [generator] Use '[U]IntPtr' in P/Invoke signatures instead of 'n[u]int'. (#13043) 2021-10-25 10:56:02 +02:00
MetalKit Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
MetalPerformanceShaders [Metal] Add Support for DotNet Attributes (#12604) 2021-09-10 17:21:47 -05:00
MetricKit [MetricKit] Add support for Xcode 13 beta4. (#12326) 2021-08-04 10:12:29 -04:00
MobileCoreServices [generator] Use new `CFArray.StringArrayFromHandle` instead of the existing `NSArray` API (#12368) 2021-08-06 09:17:48 -04:00
ModelIO [src] Adapt some code to work with both C#'s nint/nuint and our custom System.nint/System.nuint types (#13019) 2021-10-19 08:12:20 +02:00
MultipeerConnectivity [d16-7] [src] Remove Classic code from the JavaScriptCore, MapKit, MediaLibrary, MediaToolbox, Metal, MetalKit, MetalPerformanceShaders, MobileCoreServices, ModelIO, MultipeerConnectivity, NetworkExtension and NotificationCenter frameworks. (#8806) 2020-06-10 09:29:53 +02:00
NativeTypes [generator] Use '[U]IntPtr' in P/Invoke signatures instead of 'n[u]int'. (#13043) 2021-10-25 10:56:02 +02:00
NaturalLanguage [generator] Use new `CFArray.StringArrayFromHandle` instead of the existing `NSArray` API (#12368) 2021-08-06 09:17:48 -04:00
NearbyInteraction [NearbyInteraction] Convert spaces to tabs. (#12364) 2021-08-06 15:18:19 -04:00
Network [ObjCRuntime] Add nullability attributes to the Runtime class + numerous other code updates. (#13021) 2021-10-19 08:11:45 +02:00
NetworkExtension [NetworkExtension] Add Support for DotNet Attributes (#12719) 2021-09-13 22:27:21 -05:00
NewsstandKit Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
NotificationCenter Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
ObjCRuntime [src] Adapt some code to work with both C#'s nint/nuint and our custom System.nint/System.nuint types (#13019) 2021-10-19 08:12:20 +02:00
OpenGL [OpenGL] Add Support for DotNet Attributes (#12494) 2021-08-24 11:14:37 -05:00
OpenGLES Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
PassKit [PassKit] Update bindings for Xcode 13.0 beta 1, 2 (#12299) 2021-08-03 13:17:27 -04:00
PdfKit [ObjCRuntime] Add nullability attributes to the Runtime class + numerous other code updates. (#13021) 2021-10-19 08:11:45 +02:00
Photos [Photos] Add Support for DotNet Attributes 2021-09-09 12:19:41 -04:00
PhotosUI [PhotosUI][Xcode12] Update for beta 4 (#9285) 2020-08-06 11:29:30 -04:00
PrintCore [generator] Use new `CFArray.StringArrayFromHandle` instead of the existing `NSArray` API (#12368) 2021-08-06 09:17:48 -04:00
QTKit [QTKit] Use 'nint'/'nuint' instead of 'System.nint'/'System.nuint' to be compatible with C#'s nint/nuint. (#13012) 2021-10-19 08:16:46 +02:00
QuickLook [CoreFoundation] Fetch a few static values lazily. (#4924) 2018-10-09 15:51:17 +02:00
QuickLookUI
ReplayKit Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
SafariServices [monotouch-test] Make it work with Mac Catalyst. 2021-01-15 17:52:28 +01:00
SceneKit [ObjCRuntime] Add nullability attributes to the Runtime class + numerous other code updates. (#13021) 2021-10-19 08:11:45 +02:00
ScriptingBridge Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
SearchKit Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
Security [Policy] Subclass NativeObject + numerous other code updates (#13108) 2021-10-26 08:22:56 +02:00
SensorKit [dotnet] Add `[Uns|S]upportedOSPlatformAttribute` to manual bindings (part 1) (#11230) 2021-04-16 15:05:02 -04:00
Simd
Social Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
SpriteKit [ObjCRuntime] Add nullability attributes to the Runtime class + numerous other code updates. (#13021) 2021-10-19 08:11:45 +02:00
StoreKit [src] Use [NoMacCatalyst] everywhere. (#12407) 2021-08-12 07:41:10 +02:00
System.ComponentModel Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
System.Drawing Move System.Drawing types to Mono 2019-03-13 17:26:47 +01:00
System.Net.Http [d16-7] [src] Remove the remaining Classic code. (#8820) 2020-06-11 19:25:18 +02:00
SystemConfiguration [NetworkReachability] Subclass NativeObject + numerous other code updates (#13059) 2021-10-22 09:19:35 +02:00
TVMLKit [TVMLKit] Work around Apple breaking API for enum values in TVElementUpdateType. (#5849) 2019-04-09 16:48:18 +02:00
TVServices [generator][dotnet] Add support for `[Uns|S]upportedOSPlatformAttribute` (#10580) 2021-04-10 11:09:14 -04:00
Twitter Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
UIKit [UIFontFeature] Enable nullability + a few other code updates (#13088) 2021-10-25 10:56:19 +02:00
UserNotifications Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
VideoSubscriberAccount Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
VideoToolbox [VTDecompressionStatus] Enable nullability + numerous other code updates (#13051) 2021-10-20 20:18:55 +02:00
Vision Defuse BOM! 2021-08-24 18:16:44 -04:00
WKWebKit [WebKit] Add support for Xcode 13.1 rc. (#13052) 2021-10-25 20:13:00 -04:00
WatchConnectivity Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
WatchKit Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
WebKit [WebKit] Add Support for DotNet Attributes (#12653) 2021-09-09 22:59:32 -05:00
XKit [AppKit] Add Support for DotNet Attributes (#12684) 2021-09-13 22:34:33 -05:00
bgen [main] Update dependencies from dotnet/installer (#12935) 2021-10-08 14:12:23 +02:00
generate-frameworks-constants Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
generate-type-forwarders [main] Update dependencies from dotnet/installer (#12245) 2021-07-28 09:46:36 +02:00
iAd [iAD] Fix message. fixes #12569 (#12574) 2021-08-27 16:19:20 -04:00
iTunesLibrary Remove Catalyst availability and deprecation 2021-10-13 09:44:48 -04:00
xlf [bgen] Remove trailing newlines from warning/error messages. (#10701) 2021-02-25 15:04:00 +01:00
.gitignore [build] Use arcade dependency management tooling (#10890) 2021-04-02 00:02:27 -04:00
AssemblyInfo.cs.in [dotnet] Use `[AssemblyMetadata ("IsTrimmable", "True")]` in platforms assemblies (#11228) 2021-04-16 15:08:19 -04:00
Constants.iOS.cs.in Replace manually maintained code about frameworks with generated code. (#10218) 2020-12-15 18:44:05 +01:00
Constants.mac.cs.in Replace manually maintained code about frameworks with generated code. (#10218) 2020-12-15 18:44:05 +01:00
Constants.maccatalyst.cs.in [CoreGraphics] Add support for xcode13 beta 5. (#12589) 2021-09-01 11:24:10 -04:00
Constants.tvos.cs.in Replace manually maintained code about frameworks with generated code. (#10218) 2020-12-15 18:44:05 +01:00
Constants.watch.cs.in Replace manually maintained code about frameworks with generated code. (#10218) 2020-12-15 18:44:05 +01:00
ILLink.LinkAttributes.tvos.xml [src] Specialize the tvOS version of ILLink.LinkAttributes.xml. (#12108) 2021-07-14 18:07:38 +02:00
ILLink.LinkAttributes.xml.in [dotnet][linker] Fix incorrect namespace for `[NotImplementedAttribute]` (#11871) 2021-06-09 08:55:01 -04:00
ILLink.Substitutions.MacCatalyst.xml [tests] Add .NET version of link sdk for macOS. (#12462) 2021-08-18 10:01:26 +02:00
ILLink.Substitutions.ios.xml [objcruntime] Refactor `Dlfcn.dlopen` to ease linking (#12002) 2021-06-23 09:13:42 -04:00
ILLink.Substitutions.macOS.xml [tests] Add .NET version of link sdk for macOS. (#12462) 2021-08-18 10:01:26 +02:00
ILLink.Substitutions.tvos.xml [objcruntime] Refactor `Dlfcn.dlopen` to ease linking (#12002) 2021-06-23 09:13:42 -04:00
Makefile [src] Add .NET project files. (#13018) 2021-10-19 08:12:32 +02:00
Makefile.generator [src] Rename MAC_* variables to MACOS_* variables. (#12998) 2021-10-18 07:24:37 +02:00
MinimumVersions.cs.in Add the minimum OS supported inside platform assemblies metadata (#10820) 2021-03-10 09:19:20 -05:00
MonoNativeFunctionWrapperAttribute.cs [d16-7] [src] Remove the remaining Classic code. (#8820) 2020-06-11 19:25:18 +02:00
MonoPInvokeCallbackAttribute.cs [d16-7] [src] Remove the remaining Classic code. (#8820) 2020-06-11 19:25:18 +02:00
MonoTouch.NUnitLite.maccatalyst.templ.csproj Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
MonoTouch.NUnitLite.templ.csproj Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
MonoTouch.NUnitLite.tvos.templ.csproj Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
MonoTouch.NUnitLite.watchos.templ.csproj Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
OpenTK.dll.sources Move System.Drawing types to Mono 2019-03-13 17:26:47 +01:00
README.md Updating Localization READMEs (#11738) 2021-06-01 09:51:38 -05:00
Resources.Designer.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
Resources.resx [bgen] Remove trailing newlines from warning/error messages. (#10701) 2021-02-25 15:04:00 +01:00
Version.in
accelerate.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
accessibility.cs [Accessibility] Update bindings for Xcode 13.0 beta 1 (#11998) 2021-07-07 17:25:31 -04:00
accounts.cs [Accounts] Update bindings for Xcode 13.0 beta 1 (#12024) 2021-07-07 17:26:39 -04:00
addressbook.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
addressbookui.cs [AddressBook] Add Support for DotNet Attributes (#12564) 2021-08-30 11:41:35 -04:00
adservices.cs [introspection] Add/fix/remove availability attributes for Mac Catalyst to make introspection's Introduced test pass. (#10587) 2021-04-13 15:48:20 -04:00
adsupport.cs [catalyst][adsupport] Update xtro - framework is not available (#11625) 2021-05-20 09:30:55 -04:00
appclip.cs [xcode12][appclip] Update for beta 1 (#8964) 2020-06-26 17:13:30 -04:00
appkit.cs Merge pull request #12936 from rachelkang/xcode13.0-appkit-b1-b2-b3-b4-b5 2021-10-07 13:14:59 -04:00
apptrackingtransparency.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
arkit.cs [ARKit] Provide updates for Xcode13 beta1. (#11908) 2021-06-14 12:03:19 -04:00
assetslibrary.cs [d16-7] [src] Remove Classic code from the AudioUnit, AudioToolbox and AssetsLibrary frameworks. (#8775) 2020-06-05 16:06:48 +02:00
audiotoolbox.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
audiounit.cs [AudioToolbox] Update bindings for Xcode 13.0 beta 1,3,4,5 (#12491) 2021-08-20 16:17:28 -04:00
authenticationservices.cs [AuthenticationServices] Updates for Xcode13 Beta3 (#12203) 2021-08-04 10:11:26 -04:00
automaticassessmentconfiguration.cs [Xcode13] Bump xcode 13 to beta 3. (#12137) 2021-07-19 09:03:20 -04:00
avfoundation.cs Some Catalyst API annotations and corrections (#12677) 2021-09-21 14:17:52 -05:00
avkit.cs Catalyst changes for CoreAnimation, CoreFoundation, and AVKit (#12926) 2021-10-05 16:42:37 -05:00
backgroundtasks.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
bmac.ikvm [xcode11] Stop building/shipping 32-bit Xamarin.Mac bits. Partial fix for #6300. (#6393) 2019-07-15 10:19:24 -07:00
btouch-native Use relative paths in scripts. (#7545) 2019-12-10 12:47:30 +01:00
btouch-native.in
btouch.cs [btouch] Remove some nullability warnings. fixes #12260 (#12282) 2021-07-29 10:57:41 -04:00
btv Use relative paths in scripts. (#7545) 2019-12-10 12:47:30 +01:00
businesschat.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
bwatch Use relative paths in scripts. (#7545) 2019-12-10 12:47:30 +01:00
bwatch.in
callkit.cs Some Catalyst API annotations and corrections (#12677) 2021-09-21 14:17:52 -05:00
carplay.cs [Carplay] Add support for Xcode 13 beta 5 and fix catalyst attrs. (#12454) 2021-08-17 16:07:54 -04:00
cfnetwork.cs [introspection] Add/fix/remove availability attributes for Mac Catalyst to make introspection's Introduced test pass. (#10587) 2021-04-13 15:48:20 -04:00
chip.cs [chip] Disable some API on macOS (#12609) 2021-09-01 22:08:21 -04:00
classkit.cs [Classkit] Add support for Xcode13 beta1. (#11942) 2021-06-16 11:21:21 -04:00
clockkit.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
cloudkit.cs [CloudKit] Add support for Xcode13 beta1. (#11961) 2021-06-16 21:26:56 -04:00
compression.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
contacts.cs [Contacts] Add support for Xcode13 beta1. (#11962) 2021-06-16 21:26:26 -04:00
contactsui.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
coreanimation.cs Catalyst changes for CoreAnimation, CoreFoundation, and AVKit (#12926) 2021-10-05 16:42:37 -05:00
coreaudiokit.cs [src] Use [NoMacCatalyst] everywhere. (#12407) 2021-08-12 07:41:10 +02:00
corebluetooth.cs [CoreBluetooth] Add Xcode 13 beta 3 support. (#12153) 2021-07-21 13:03:05 -04:00
coredata.cs [CoreData] Add support for Xcode 13 beta 3. (#12183) 2021-07-23 11:24:19 -04:00
corefoundation.cs [generator] Use new CFArray.ArrayFromHandle instead of the existing NSArray API (#12415) 2021-08-12 14:19:25 -04:00
coregraphics.cs [CoreGraphics] Add support for xcode13 beta 5. (#12589) 2021-09-01 11:24:10 -04:00
corehaptics.cs [CoreHaptics] Add support for Xcode13 beta1. (#11963) 2021-06-17 15:15:07 -04:00
coreimage.cs [CoreImage] Update bindings for Xcode 13.0 beta 1 and 3 2021-09-10 14:09:43 -04:00
corelocation.cs [src] Use [NoMacCatalyst] everywhere. (#12407) 2021-08-12 07:41:10 +02:00
corelocationui.cs [CoreLocationUI] Add new framework for Xcode13 beta1. (#11979) 2021-06-21 12:10:13 -04:00
coremedia.cs [xcode12.2][intro] check for duplicate or inconsistent availability attributes (#9825) (#9856) 2020-10-14 13:57:14 -04:00
coremidi.cs [coremidi] Remove incorrect `.ctor` on `MIDICISession` (#11910) 2021-06-14 09:20:52 -04:00
coreml.cs [CoreML] Avoid using an internal method that overloads a public method based on IntPtr/nint. (#13013) 2021-10-19 08:17:06 +02:00
coremotion.cs [CoreMotion] Add Xcode13 beta5 support. (#12448) 2021-08-16 20:52:02 -04:00
corenfc.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
coreservices.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
corespotlight.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
coretelephony.cs [Main] Bring Xcode12.1 support. 2020-10-20 17:55:31 -04:00
coretext.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
corevideo.cs [CoreVideo] Add support for Xcode 13 beta3. (#12257) 2021-09-13 11:09:26 -04:00
corewlan.cs [CoreWLAN] Updates for Catalyst 2021-10-21 16:03:25 -04:00
custom-make.sh
devicecheck.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
dotnet.tmpl.csproj [src] Add .NET project files. (#13018) 2021-10-19 08:12:32 +02:00
error.cs [Localization] Add generator error messages (#7531) 2020-01-08 16:07:46 -05:00
eventkit.cs [EventKit] Updates for Xcode13 Beta1 (#12022) 2021-07-01 18:25:58 -05:00
eventkitui.cs [d16-7] [xtro][bindings] Add xtro support for nullability and fix some bindings (#8341) 2020-04-10 12:37:16 -04:00
executionpolicy.cs [executionpolicy] Update for Xcode 11 beta 1 (#6774) 2019-08-14 22:07:55 -04:00
externalaccessory.cs [introspection] Add/fix/remove availability attributes for Mac Catalyst to make introspection's Introduced test pass. (#10587) 2021-04-13 15:48:20 -04:00
fileprovider.cs Some Catalyst API annotations and corrections (#12677) 2021-09-21 14:17:52 -05:00
fileproviderui.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
findersync.cs [d16-7] [src] Remove Classic code from the FinderSync, FileProvider[UI], ExternalAccessory, EventKit[UI], DeviceCheck, CoreWlan and CoreVideo frameworks. (#8803) 2020-06-10 09:28:29 +02:00
foundation.cs [Foundation] Add attributes and fix ignores for Catalyst (#12854) 2021-09-29 10:18:01 -05:00
frameworks.sources [WebKit] Add support for Xcode 13.1 rc. (#13052) 2021-10-25 20:13:00 -04:00
gamecontroller.cs [GameController] Add support for xcode 13 beta5. (#12445) 2021-08-16 17:48:37 -04:00
gamekit.cs [gamekit] Remove `isPresentingFriendRequestViewController` from Catalyst (#12206) 2021-07-23 21:58:19 -04:00
gameplaykit.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
generate-defines.csharp [src] Generate a define for each framework for every platform. (#10171) 2020-12-01 11:14:32 +01:00
generate-errors.csharp [build] generate Errors.Designer.cs for runtime assemblies (#8921) 2020-06-23 09:01:05 +02:00
generate-frameworks.csharp [src] Generate generated-framework.g.cs for Mac Catalyst 2020-12-03 10:43:19 +01:00
generator-attribute-manager.cs [generator] Small source simplification (#12670) 2021-09-09 09:41:44 -04:00
generator-attributes.cs [generator] Do not generate `BindingImplOptions.Optimizable` when code snippets are provided (#12165) 2021-07-27 09:36:22 -04:00
generator-diff.mk
generator-enums.cs [ObjCRuntime] Add nullability attributes to the Runtime class + numerous other code updates. (#13021) 2021-10-19 08:11:45 +02:00
generator-filters.cs [ObjCRuntime] Add nullability attributes to the Runtime class + numerous other code updates. (#13021) 2021-10-19 08:11:45 +02:00
generator-typemanager.cs Replace IKVM.Reflection with MetadataLoadContext (#9864) 2021-05-21 15:15:59 +02:00
generator.cs [ABRecord] Subclass NativeObject + numerous other code updates (#13085) 2021-10-25 10:57:24 +02:00
generator.csproj Replace IKVM.Reflection with MetadataLoadContext (#9864) 2021-05-21 15:15:59 +02:00
generator.sln
glkit.cs [glkit] Add nullability to (generated and manual) bindings (#10765) 2021-03-03 09:33:09 -05:00
global.css
healthkit.cs [HealthKit] Add Xcode13 beta5 support. (#12453) 2021-08-17 09:57:29 -04:00
healthkitui.cs
homekit.cs [HomeKit] Updates for Xcode13 Beta 5 (#12451) 2021-08-16 21:06:46 -04:00
iad.cs [iad] Remove most of the framework (#11906) 2021-06-14 20:13:47 -04:00
identitylookup.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
identitylookupui.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
imagecapturecore.cs [ImageCaptureCore] Remove redundant availability attribute. 2018-11-20 08:41:36 +01:00
imageio.cs [ImageIO] Add support for Xcode 13 beta 3. (#12145) 2021-07-20 15:42:56 -04:00
imagekit.cs using swift names (#12095) 2021-07-12 11:18:02 -05:00
inputmethodkit.cs Remove 10.7 & 10.8 availability attributes, since they're redundant now. 2018-10-25 17:12:39 +02:00
intents.cs [Intents] Update bindings for Xcode 13.0 betas 1 through 5 (#12771) 2021-09-21 20:30:56 -04:00
intentsui.cs Update based on feedback 2021-10-20 17:39:11 -04:00
iosurface.cs [iOSurface] Remove warning from the generator. (#9357) 2020-08-12 22:00:11 -04:00
ituneslibrary.cs [iTunesLibrary] Update bindings for Xcode 13.0 beta 1 (#12038) 2021-07-09 10:42:15 -05:00
javascriptcore.cs [xcode12.2][intro] check for duplicate or inconsistent availability attributes (#9825) (#9856) 2020-10-14 13:57:14 -04:00
linkpresentation.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
localauthentication.cs [xcode12.2][intro] check for duplicate or inconsistent availability attributes (#9825) (#9856) 2020-10-14 13:57:14 -04:00
localauthenticationembeddedui.cs Update src/localauthenticationembeddedui.cs 2021-08-31 12:35:26 -04:00
mailkit.cs [mailkit] Disable some selector not working on macOS 12 beta 6 (#12602) 2021-08-31 21:08:12 -04:00
mapkit.cs [MapKit] Update bindings for Xcode 13.0 beta 1 and beta 2 (#12081) 2021-07-07 17:29:43 -04:00
mediaaccessibility.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
medialibrary.cs [d16-7] [src] Remove Classic code from the JavaScriptCore, MapKit, MediaLibrary, MediaToolbox, Metal, MetalKit, MetalPerformanceShaders, MobileCoreServices, ModelIO, MultipeerConnectivity, NetworkExtension and NotificationCenter frameworks. (#8806) 2020-06-10 09:29:53 +02:00
mediaplayer.cs [introspection] Add/fix/remove availability attributes for Mac Catalyst to make introspection's Introduced test pass. (#10587) 2021-04-13 15:48:20 -04:00
mediasetup.cs [mediasetup] Update for Xcode 12 beta 2 (#9087) 2020-07-16 20:34:19 -04:00
mediatoolbox.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
messages.cs [xcode12.2][intro] check for duplicate or inconsistent availability attributes (#9825) (#9856) 2020-10-14 13:57:14 -04:00
messageui.cs [xtro] Fix nullability checks on parameters (#10279) 2020-12-15 08:24:10 -05:00
metal.cs [Metal] Add support for xcode 13 beta5 . (#12875) 2021-10-05 13:32:48 -04:00
metalkit.cs Add a parameterless constructor for MTKView (#9139) 2021-09-21 13:27:03 +02:00
metalperformanceshaders.cs [introspection] Add/fix/remove availability attributes for Mac Catalyst to make introspection's Introduced test pass. (#10587) 2021-04-13 15:48:20 -04:00
metrickit.cs [MetricKit] Add support for Xcode 13 beta4. (#12326) 2021-08-04 10:12:29 -04:00
mlcompute.cs [MLCompute] Add support for Xcode 13 beta 4. (#12348) 2021-08-05 01:02:27 -04:00
mobilecoreservices.cs [ModelIO] Add Xcode 13 beta4 support. (#12349) 2021-08-04 22:40:05 -04:00
modelio.cs [ModelIO] Add Xcode 13 beta4 support. (#12349) 2021-08-04 22:40:05 -04:00
multipeerconnectivity.cs [xcode12.2][intro] check for duplicate or inconsistent availability attributes (#9825) (#9856) 2020-10-14 13:57:14 -04:00
naturallanguage.cs [introspection] Add/fix/remove availability attributes for Mac Catalyst to make introspection's Introduced test pass. (#10587) 2021-04-13 15:48:20 -04:00
nearbyinteraction.cs [NearbyInteraction] Convert spaces to tabs. (#12364) 2021-08-06 15:18:19 -04:00
network.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
networkextension.cs Merge pull request #12990 from rachelkang/cat_networkextension 2021-10-19 12:26:48 -04:00
newsstandkit.cs [d16-7] [xtro][bindings] Add xtro support for nullability and fix some bindings (#8341) 2020-04-10 12:37:16 -04:00
notificationcenter.cs [notificationcenter] Update for Xcode 12 beta 5 (#9416) 2020-08-20 13:09:50 -04:00
opengl.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
opengles.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
opentk.csproj Move System.Drawing types to Mono 2019-03-13 17:26:47 +01:00
oslog.cs [OSLog] Add support for xcode13 beta4. (#12392) 2021-08-10 23:12:16 -04:00
packages.config [Localization] Add generator error messages (#7531) 2020-01-08 16:07:46 -05:00
passkit.cs [PassKit] Add support for xcode13 beta 5. (#12456) 2021-08-17 09:59:33 -04:00
pdfkit.cs [PDFKit] Updating Xcode13 Beta 1 (#11987) 2021-06-22 10:58:32 -05:00
pencilkit.cs Some Catalyst API annotations and corrections (#12677) 2021-09-21 14:17:52 -05:00
phase.cs [PHASE] Add suppport for Xcode13 beta 2. (#12098) 2021-08-04 22:38:03 -04:00
photos.cs [src] Use [NoMacCatalyst] everywhere. (#12407) 2021-08-12 07:41:10 +02:00
photosui.cs [src] Use [NoMacCatalyst] everywhere. (#12407) 2021-08-12 07:41:10 +02:00
printcore.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
pushkit.cs Some Catalyst API annotations and corrections (#12677) 2021-09-21 14:17:52 -05:00
qtkit.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
quartzcomposer.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
quicklook.cs [QuickLook] update based on quicklookui feedback (#12402) 2021-08-16 17:35:11 -04:00
quicklookUI.cs update based on feedback 2021-08-10 11:40:31 -04:00
quicklookthumbnailing.cs Some Catalyst API annotations and corrections (#12677) 2021-09-21 14:17:52 -05:00
replaykit.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
rosetta.pl
safariservices.cs [generator] Do not generate `BindingImplOptions.Optimizable` when code snippets are provided (#12165) 2021-07-27 09:36:22 -04:00
scenekit.cs [src] Use [NoMacCatalyst] everywhere. (#12407) 2021-08-12 07:41:10 +02:00
screentime.cs [introspection] Add/fix/remove availability attributes for Mac Catalyst to make introspection's Introduced test pass. (#10587) 2021-04-13 15:48:20 -04:00
scriptingbridge.cs [d16-8] [SBApplication][Bug] SBApplication.FromBundleIdentifier<T> should return null when bundle ID is unknown (#9668) 2020-09-18 18:19:23 -04:00
searchkit.cs
security.cs [introspection] Add/fix/remove availability attributes for Mac Catalyst to make introspection's Introduced test pass. (#10587) 2021-04-13 15:48:20 -04:00
sensorkit.cs [SensorKit] Updates for Xcode13 Beta1 2021-07-23 14:16:28 -05:00
shazamkit.cs [ShazamKit] Updates Xcode13 beta1 (#12189) 2021-08-17 11:02:55 -05:00
social.cs [Accounts] Update bindings for Xcode 13.0 beta 1 (#12024) 2021-07-07 17:26:39 -04:00
soundanalysis.cs [SoundAnalysis] Updates for Xcode13 Beta1 (#12181) 2021-08-04 10:09:46 -04:00
speech.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
spritekit.cs [runtime] Return the exception from wrapper methods for exception marshalling. (#11382) 2021-05-04 08:25:38 +02:00
storekit.cs Update based on feedback 2021-07-21 16:22:29 -04:00
systemconfiguration.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
threadnetwork.cs [ThreadNetwork] Add new framework Xcode 13 beta 5. (#12533) 2021-08-26 18:15:31 -04:00
touch-unit.sources [master] Bump mono to pickup needed nunitlite changes. (#7812) 2020-02-07 09:56:41 -05:00
tvmlkit.cs [xcode12][tvmlkit] Update for beta 1 (#8966) 2020-06-26 17:14:35 -04:00
tvservices.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
tvuikit.cs [TVUIKit] Update bindings to Xcode 13 Beta 5 (#12722) 2021-09-16 19:03:48 -04:00
twitter.cs [Accounts] Update bindings for Xcode 13.0 beta 1 (#12024) 2021-07-07 17:26:39 -04:00
uikit.cs [UIKit] Add Catalyst support (#12809) 2021-10-05 11:04:44 -05:00
uniformtypeidentifiers.cs initial changes for Xcode13 UniformTypeIdentifiers Beta1 (#12008) 2021-06-23 16:27:51 -05:00
usernotifications.cs [UserNotifications] Updates for Catalyst (#13057) 2021-10-21 10:12:48 -04:00
usernotificationsui.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
videosubscriberaccount.cs [src] Use [NoMacCatalyst] everywhere. (#12407) 2021-08-12 07:41:10 +02:00
videotoolbox.cs Update based on feedback 2021-10-15 11:37:52 -04:00
vision.cs Remove misplaced static 2021-08-23 14:48:01 -04:00
visionkit.cs fix header name 2019-08-27 20:25:33 -04:00
watchconnectivity.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
watchkit.cs [WatchKit] Add support for Xcode13 beta 1. (#11911) 2021-06-14 12:05:33 -04:00
webkit.cs [d16-7] [src] Remove Classic code from the OpenGL, PassKit, PdfKit, Photos, QTKit, ReplayKit, SearchKit, Security, Social, SpriteKit, SystemConfiguration, Twitter, UserNotification, VideoToolbox, Vision, WebKit and WKWebKit frameworks. (#8816) 2020-06-10 15:38:58 +02:00
wkwebkit.cs [WebKit] Add support for Xcode 13.1 rc. (#13052) 2021-10-25 20:13:00 -04:00
xamios.tmpl.csproj Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
xammac.pc.in
xammac.tmpl.csproj Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
xammaccatalyst.tmpl.csproj Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
xamtvos.tmpl.csproj Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
xamwatch.tmpl.csproj Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
xkit.cs [CoreVideo/XKit] Add missing availability attributes. (#12963) 2021-10-11 14:09:42 +02:00

README.md

Platform assemblies

This directory contains the source code and build logic to build the platform assemblies.

Generator

The generator takes API definition files (most *.cs files in src/) as input, and generates the required binding code.

There is one generator executable, based on IKVM, that's used to generate the binding code for all platforms.

The generator relies heavily on binding attributes; all the binding attributes (that are not in the platform assembly) are compiled into a separate attribute assembly (Xamarin.[iOS|TVOS|WatchOS|Mac].BindingAttributes.dll).

Since the platform assemblies (and thus all the binding attributes assemblies as well) reference each platform's BCL, those assemblies can't be loaded directly into the generator at runtime. In order to not make the generator code too complicated, all the attributes are also compiled into the generator executable, and then instantiated as mock-objects of the real attributes.

The solution generator.sln can be used to debug the generator. There are multiple run configurations (ios, tvos, watchos, mac-unified, mac-full), each configured to execute the generator with the options for the corresponding profile.

Generator diff

Two special make targets can be used to compare the generated code (.g.cs files) changes between two branches.
This is required when making changes to the generator.

  1. Checkout the clean base branch (e.g main's HEAD) the feature (target) branch is based on.
  2. Do make generator-reference in xamarin-macios/src.
  3. Checkout the feature branch that requires the diff.
  4. Do make generator-diff.

Tip: do git diff | pbcopy in xamarin-ios/src/generator-reference and paste that anywhere (gist for instance).

Conditional compilation

These are the symbols defined for each platform assembly:

Assembly Symbols
Xamarin.iOS.dll IPHONE MONOTOUCH IOS
Xamarin.Mac.dll MONOMAC
Xamarin.WatchOS.dll IPHONE MONOTOUCH WATCH XAMCORE_3_0
Xamarin.TVOS.dll IPHONE MONOTOUCH TVOS XAMCORE_3_0

To build core for only one platform, use the platform unique variables IOS, MONOMAC, WATCH or TVOS.

Core Assemblies

Currently 2 variations of the core Xamarin.iOS assembly and 4 variations of the core Xamarin.Mac assembly are produced:

### Xamarin.iOS ###

  • A 32-bit Unified assembly (uses System.nint in place of NSInteger, etc.)
  • A 64-bit Unified assembly (same as 32-bit Unified)

### Xamarin.Mac ###

  • A 32-bit Unified assembly (uses System.nint in place of NSInteger, etc.)
  • A 64-bit Unified assembly (same as 32-bit Unified)
  • A 32-bit Full assembly (uses System.nint in place of NSInteger, and references the v4.5 BCL)
  • A 64-bit Full assembly (same as 32-bit Full)

Classic Assemblies

The 32-bit Classic assemblies for iOS and Mac are no longer built and are now copied from the macios-binaries module.

The Classic assembly are copied in, tested, and shipped in order to not break customer code. Customers can choose to continue using this assembly, but we will encourage customers to move to our Unified assemblies.

The Unified assemblies provides many improvements and support for 64-bit iOS and OS X APIs.

Native Types

Most native APIs use NSInteger (and related) typedefs. On 32-bit systems, these are 32-bit underlying types; on 64-bit systems, these are 64-bit underlying types.

Historically Xamarin.iOS and Xamarin.Mac have bound these explicitly as 32-bit (System.Int32, etc). With the move to 64-bit that has been ongoing in OS X for a few versions (10.6/Snow Leopard) and more recently with the anouncement of 64-bit support in iOS, we needed a solution to support both worlds.

We have introduced 6 new types to make this possible:

Native Type Legacy (32-bit) CIL Type New (32/64-bit) CIL Type
NSInteger System.Int32 System.nint
NSUInteger System.UInt32 System.nuint
CGFloat System.Single System.nfloat
CGSize System.Drawing.SizeF CoreGraphics.CGSize
CGPoint System.Drawing.PointF CoreGraphics.CGPoint
CGRect System.Drawing.RectangleF CoreGraphics.CGRect

In the Classic assembly, the System.Drawing types are backed by the 32-bit System.Single type. In the Unified assemblies, the CoreGraphics types are backed by 32/64-bit System.nfloat type.

Enums

Enums are handled specially. Most native enums are backed by NSInteger or NSUInteger. Unfortunately in C#, the backing type of an enum may only be one of the primitive integral C# types. Thus, an enum cannot be backed by System.nint or System.nuint.

The convention is to make all enums that are backed natively by NSInteger or NSUInteger backed by a 64-bit primitive integral C# type (long or ulong) and then annotated with the [Native] attribute. This ensures that API is identical between the 32/64-bit assemblies but also hints to the code generator that Objective-C runtime calls should first cast the enum to a System.nint or System.nuint.

Native Enum Definition

typedef NS_ENUM(NSUInteger, NSTableViewDropOperation) {
	NSTableViewDropOn,
	NSTableViewDropAbove
};

Managed Enum Definition

[Native]
public enum NSTableViewDropOperation : nuint {
	DropOn,
	DropAbove
}

When dealing with enums in P/Invokes, one must never pass such an enum directly. The P/Invoke signature should take a System.nint or System.nuint and a wrapper API must cast the enum manually (as mentioned above, this is handled automatically for Objective-C APIs by the generator).

Objective-C Binding

interface Fooable {
	[Export ("foo:")]
	void Foo (NSTableViewDropOperation dropOp);
}

C Binding

public partial class Fooable {
	[DllImport ("foo")]
	static extern void Foo (nuint dropOp);

	public static void Foo (NSTableViewDropOperation dropOp)
	{
		Foo ((nuint)(ulong)dropOp);
	}
}

#define

There are a few preprocessor variables that can be used within sources for conditional compilation:

Variable Description
MONOMAC defined for Xamarin.Mac builds; not defined for Xamarin.iOS
ARCH_32 defined when the target architecture is 32-bit; this will be defined for Classic and the Unified 32-bit assemblies
ARCH_64 defined when the target architecture is 64-bit; this will be defined only for the Unified 64-bit assembly
COREBUILD defined when building the intermediate core.dll assembly against which the code generator will produce bindings

For example, to build an API for all of iOS but only 64-bit OS X (Xamarin.Mac):

#if !MONOMAC || (MONOMAC && ARCH_64)
...
#endif

Source Localization

Coming soon!

See Localization Wiki for more details on our localization process

or the OneLocBuild Wiki for information on OneLocBuild.