xamarin-macios/src
Sebastien Pouliot 3090eca84d
[tests][intro] Detect cases where [Unavailable] is mis-used (#9871)
For each platform the presence of `[Unavailable]` should mean there are
no other availability (introduced, deprecated or obsoleted) attributes
on the same member.

Also check if the type is unavailable. In that case no member should,
for that platform, have other availability attributes.

Also fix failures - all in WatchKit which was removed from iOS.
2020-10-15 08:57:47 -04:00
..
ARKit [ARKit] Update framework to Xcode 12 beta 5. (#9402) 2020-08-21 10:37:15 -04:00
AVFoundation [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
AVKit [AVKit] Update for Xcode 11 up to beta 7 (#6748) 2019-08-28 10:24:02 -04:00
Accelerate [d16-7] [src] Remove Classic code from the Accelerate, Accounts, AddressBook[UI] and ARKit frameworks. (#8756) 2020-06-04 18:36:26 +02:00
Accounts [d16-7] [src] Remove Classic code from the Accelerate, Accounts, AddressBook[UI] and ARKit frameworks. (#8756) 2020-06-04 18:36:26 +02:00
AddressBook [tests][xtro] Check for deprecated p/invokes (C API) (#9700) 2020-09-30 09:57:37 -04:00
AddressBookUI [AddressBookUI] Fix indentation. (#8924) 2020-06-23 08:56:13 +02:00
AppKit [Xcode12] Bring xcode 12 changes into main. 2020-09-23 16:05:22 -04:00
AssetsLibrary [d16-7] [src] Remove Classic code from the AudioUnit, AudioToolbox and AssetsLibrary frameworks. (#8775) 2020-06-05 16:06:48 +02:00
AudioToolbox [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
AudioUnit [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
AuthenticationServices [AuthenticationServices] Fix ASAuthorization and ASAuthorizationRequest (#6619) 2019-07-19 16:24:04 -04:00
BackgroundTasks [BackgroundTasks] Add new Framework for Xcode 11 beta 1. (#6438) 2019-07-02 15:54:21 +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 [CFNetwork] Add support for xcode 12 beta 1. (#9006) 2020-07-07 17:53:50 -04:00
CallKit [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
CarPlay [CarPlay] [Xcode 12] Update through beta 6 (#9479) 2020-08-28 13:45:43 -04:00
Carbon
ClassKit [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
ClockKit [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
CloudKit [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
Compression [src] Define NET[_TODO] instead of DOTNET[_TODO]. 2020-03-11 11:54:34 +01:00
Contacts [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
CoreAnimation [tests][intro] Split attributes typos from API typos tests (#9652) 2020-09-30 07:53:48 -04:00
CoreBluetooth [tests][cecil] Check that error-based enum values don't have availability attributes (#9737) 2020-09-30 15:15:18 -04:00
CoreData [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
CoreFoundation [tests][xtro] Check for deprecated p/invokes (C API) (#9700) 2020-09-30 09:57:37 -04:00
CoreGraphics [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
CoreHaptics [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
CoreImage [coreimage] Update for Xcode 12 beta 3 (#9191) 2020-07-25 11:31:13 -04:00
CoreLocation [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
CoreML [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
CoreMedia [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
CoreMidi [tests][xtro] Check for deprecated p/invokes (C API) (#9700) 2020-09-30 09:57:37 -04:00
CoreMotion [d16-7] [src] Remove Classic code from the CoreMedia, CoreMidi, CoreML, CoreMotion, CoreNFC, CoreTelephony and CoreText frameworks. (#8792) 2020-06-10 09:28:19 +02:00
CoreServices [FSEvents] Update for Xcode 12 beta 4. (#9390) 2020-08-17 18:22:24 -04:00
CoreSpotlight [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
CoreTelephony [tests][intro] Split attributes typos from API typos tests (#9652) 2020-09-30 07:53:48 -04:00
CoreText [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
CoreVideo [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
CoreWlan [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
Darwin
EventKit [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
EventKitUI [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
ExternalAccessory Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
FileProvider [fileprovider] Update for Xcode 12 beta 6 (#9581) 2020-09-04 15:46:49 -04:00
FinderSync
Foundation [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
GLKit [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
GameController beta 5 updates (#9431) 2020-08-20 20:26:45 -04:00
GameKit [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
GameplayKit [tests][intro] Split attributes typos from API typos tests (#9652) 2020-09-30 07:53:48 -04:00
HealthKit [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
HomeKit [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
IOSurface [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
ImageCaptureCore
ImageIO [xcode12] [ImageIO] Update bindings for Xcode11 (#8942) 2020-06-25 15:28:29 -04:00
ImageKit [macos][imagekit] Update for Xcode 11 beta 1 (#6772) 2019-08-14 22:06:24 -04:00
InputMethodKit
Intents [tests][intro] Split attributes typos from API typos tests (#9652) 2020-09-30 07:53:48 -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] Update bindings to Xcode 11.4 Beta 1 (#7884) 2020-02-13 11:21:42 -05:00
MLCompute [mlcompute] New Xcode 12 framework. Up-to-date with beta 3 (#9208) 2020-07-28 20:55:28 -04:00
MapKit [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
MediaAccessibility [mediaaccessibility] Update for Xcode 11 beta 5 (#6733) 2019-08-07 19:40:32 -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 [tests][cecil] Check that error-based enum values don't have availability attributes (#9737) 2020-09-30 15:15:18 -04:00
MediaToolbox [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
MessageUI
Metal [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
MetalKit [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
MetalPerformanceShaders [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
MetricKit [metrickit] Update for Xcode 12 beta 2 (#9151) 2020-07-22 13:32:06 -04:00
MobileCoreServices [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
ModelIO [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04: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 CGRect, CGPoint, CGSize: add tuple deconstruction methods (#9641) 2020-09-17 10:41:13 +02:00
NaturalLanguage Remove some LINQ usages (#9196) 2020-07-29 08:10:49 +02:00
NearbyInteraction [NearbyInteraction][Xcode12] Add manual binding for NINearbyObjectDirectionNotAvailable (#9346) 2020-08-12 15:43:00 -04:00
Network [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
NetworkExtension [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
NewsstandKit [Newsstandkit] Update for Xcode 11 beta 1 (#6992) 2019-09-13 15:23:21 -04:00
NotificationCenter [notificationcenter] Update for Xcode 12 beta 5 (#9416) 2020-08-20 13:09:50 -04:00
ObjCRuntime [tests][intro] Split attributes typos from API typos tests (#9652) 2020-09-30 07:53:48 -04:00
OpenGL [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
OpenGLES
PassKit [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
PdfKit [Submission] Fix all the selectors that apple warns about. (#9268) (#9408) 2020-08-21 16:30:51 -04:00
Photos 10.16 -> 11.0 (#9190) 2020-07-27 11:09:57 -04:00
PhotosUI [PhotosUI][Xcode12] Update for beta 4 (#9285) 2020-08-06 11:29:30 -04:00
PrintCore
QTKit [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
QuickLook
QuickLookUI
ReplayKit [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
SafariServices [safariservices] Update for Xcode 12 beta 2 (#9053) 2020-07-10 08:55:03 -04:00
SceneKit [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
ScriptingBridge [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 [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
Security [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
SensorKit [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
Simd
Social [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
SpriteKit [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
StoreKit [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
System.ComponentModel
System.Drawing
System.Net.Http [d16-7] [src] Remove the remaining Classic code. (#8820) 2020-06-11 19:25:18 +02:00
SystemConfiguration [tests][xtro] Check for deprecated p/invokes (C API) (#9700) 2020-09-30 09:57:37 -04:00
TVMLKit
TVServices [tests][xtro] Check for deprecated p/invokes (C API) (#9700) 2020-09-30 09:57:37 -04:00
Twitter [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
UIKit [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
UserNotifications [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
VideoSubscriberAccount
VideoToolbox [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
Vision [Vision] Update bindings to Xcode 12 Beta 1 - 6 (#9523) 2020-08-28 10:57:22 -04:00
WKWebKit [wkwebkit] Update for Xcode 12 beta 3 (#9178) 2020-07-24 11:45:47 -04:00
WatchConnectivity [watchconnectivity] Update for xcode 11 beta 1 (#6283) 2019-06-13 16:44:54 -04:00
WatchKit [tests][intro] Detect cases where [Unavailable] is mis-used (#9871) 2020-10-15 08:57:47 -04:00
WebKit [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
XKit [Submission] Fix all the selectors that apple warns about. (#9268) (#9408) 2020-08-21 16:30:51 -04:00
bgen Add ikvm-fork as a submodule instead of using the sources embedded in the mono archive. (#9776) 2020-10-05 15:43:32 +02:00
iAd [iads] Update for Xcode 12 beta 2 (#9049) 2020-07-09 17:31:48 -04:00
iTunesLibrary [xcode11] [ItunesLibrary] macOS b1 bindings (#6602) 2019-07-22 09:51:53 -04:00
xlf [msbuild] missing localization comments - part 3 (#8721) 2020-06-02 13:57:11 -05:00
.gitignore
AssemblyInfo.cs.in
Constants.iOS.cs.in [Xcode12] Bring xcode 12 changes into main. 2020-09-23 16:05:22 -04:00
Constants.mac.cs.in [Xcode12] Bring xcode 12 changes into main. 2020-09-23 16:05:22 -04:00
Constants.tvos.cs.in [Xcode12] Bring xcode 12 changes into main. 2020-09-23 16:05:22 -04:00
Constants.watch.cs.in [tests][intro] Split attributes typos from API typos tests (#9652) 2020-09-30 07:53:48 -04:00
Makefile [src] Build the .NET version of our product assemblies using a .NET 5 BCL. (#9637) 2020-09-21 13:22:44 +02:00
Makefile.generator [src] Build the .NET version of our product assemblies using a .NET 5 BCL. (#9637) 2020-09-21 13:22:44 +02: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.templ.csproj [master] Bump mono to pickup needed nunitlite changes. (#7812) 2020-02-07 09:56:41 -05:00
MonoTouch.NUnitLite.tvos.templ.csproj [master] Bump mono to pickup needed nunitlite changes. (#7812) 2020-02-07 09:56:41 -05:00
MonoTouch.NUnitLite.watchos.templ.csproj [master] Bump mono to pickup needed nunitlite changes. (#7812) 2020-02-07 09:56:41 -05:00
OpenTK.dll.sources
README.md [xcode12] Rename master to main (#9631) 2020-09-15 07:09:29 -04:00
Resources.Designer.cs [bgen] Intercept IKVM's assembly resolution to find assemblies ourselves. 2020-03-09 18:43:42 +01:00
Resources.resx [mtouch] Remove empty comment tags from localization resx files. (#8781) 2020-06-05 17:08:36 +02:00
Version.in
accelerate.cs
accessibility.cs [Accessibility] Update bindings to Xcode 12 Beta 3 (#9227) 2020-07-30 09:30:03 -04:00
accounts.cs [xcode12][tests] Fix typos (#9640) 2020-09-15 13:09:18 -04:00
addressbook.cs
addressbookui.cs [d16-7] [src] Remove Classic code from the Accelerate, Accounts, AddressBook[UI] and ARKit frameworks. (#8756) 2020-06-04 18:36:26 +02:00
adsupport.cs [AdSupport] Update bindings to Xcode 12 Beta 3 (#9229) 2020-07-30 09:30:56 -04:00
appclip.cs [xcode12][appclip] Update for beta 1 (#8964) 2020-06-26 17:13:30 -04:00
appkit.cs [AppKit] Allow NSGraphicsContext.CurrentContext to be null (#9838) 2020-10-09 13:44:34 -05:00
apptrackingtransparency.cs [AppTrackingTransparency] Add support for Xcode 12 beta 4 (#9385) 2020-08-19 15:54:04 +02:00
arkit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -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
audiounit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
authenticationservices.cs [AuthenticationServices] Update bindings to Xcode 12 Beta 4 (#9302) 2020-08-06 18:29:22 -04:00
automaticassessmentconfiguration.cs [AutomaticAssessmentConfiguration] Update Binding to Xcode 12 beta 5 2020-08-21 09:36:56 -05:00
avfoundation.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
avkit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
backgroundtasks.cs [BGTasks] Do not make BGTask abstract. (#8532) 2020-05-15 09:53:18 -04: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 [bgen] Improve lookup of dependent assemblies by looking in our explicitly referenced assemblies to see if we were passed the path. 2020-08-10 16:12:41 +02: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 [tests][cecil] Check that error-based enum values don't have availability attributes (#9737) 2020-09-30 15:15:18 -04:00
carplay.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
cfnetwork.cs [Xcode12] Fix some availability attributes missed in the Beta 3/4 updates (#9333) 2020-08-07 22:18:13 -04:00
classkit.cs [xcode12] Introspection-based fixes for Big Sur (#9632) 2020-09-15 08:56:24 -04:00
clockkit.cs Merge xcode12 into d16-8. 2020-09-18 17:51:52 -04:00
cloudkit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
compression.cs
contacts.cs [Contacts] Update to xcode12 beta 3. (#9275) 2020-08-05 06:07:23 -04:00
contactsui.cs [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
coreanimation.cs [Submission] Fix all the selectors that apple warns about. (#9268) (#9408) 2020-08-21 16:30:51 -04:00
coreaudiokit.cs [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
corebluetooth.cs [Submission] Fix all the selectors that apple warns about. (#9268) (#9408) 2020-08-21 16:30:51 -04:00
coredata.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
corefoundation.cs
coregraphics.cs [CoreGraphics] Update bindings to Xcode 12 Beta 3 & 4 (#9299) 2020-08-06 16:08:18 -04:00
corehaptics.cs [CoreHaptics] Update framework for Xcode 12 beta 3. (#9273) 2020-08-05 11:43:44 -04:00
coreimage.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
corelocation.cs [CoreLocation] Update framework to Xcode 12 beta 5. (#9427) 2020-08-21 00:06:33 -04:00
coremedia.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
coremidi.cs [Submission] Fix all the selectors that apple warns about. (#9268) (#9408) 2020-08-21 16:30:51 -04:00
coreml.cs [tests][cecil] Check that error-based enum values don't have availability attributes (#9737) 2020-09-30 15:15:18 -04:00
coremotion.cs [xcode12] Xcode 12 Beta 5 Initial bump (#9406) 2020-08-20 08:39:46 -04:00
corenfc.cs [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
coreservices.cs
corespotlight.cs [corespotlight] Update for Xcode 12 beta 3 (#9194) 2020-07-25 11:31:44 -04:00
coretelephony.cs [tests][intro] Split attributes typos from API typos tests (#9652) 2020-09-30 07:53:48 -04:00
coretext.cs [d16-7] [src] Remove Classic code from the CoreMedia, CoreMidi, CoreML, CoreMotion, CoreNFC, CoreTelephony and CoreText frameworks. (#8792) 2020-06-10 09:28:19 +02:00
corevideo.cs [CoreVideo][Xcode12] Update through beta 3 (#9209) 2020-07-27 19:44:37 -04:00
corewlan.cs [corewlan] Update for Xcode 12 beta 3 (#9207) 2020-07-27 13:24:10 -04:00
custom-make.sh
devicecheck.cs [devicecheck] Update for Xcode 12 beta 2 (#9145) 2020-07-21 19:21:18 -04:00
error.cs [Localization] Add generator error messages (#7531) 2020-01-08 16:07:46 -05:00
eventkit.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
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 [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
fileprovider.cs [tests][cecil] Check that error-based enum values don't have availability attributes (#9737) 2020-09-30 15:15:18 -04:00
fileproviderui.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
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 [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
frameworks.sources [Metal][Generator] Fix the SetBuffers methods in protocols. Fixes #9649 (#9651) 2020-10-01 14:27:55 -04:00
gamecontroller.cs [xcode12] Initial bump for Xcode 12 GM (#9644) 2020-09-16 11:41:44 +02:00
gamekit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
gameplaykit.cs [d16-7] [src] Remove Classic code from the GameController, GameKit, GameplayKit, GLKit, HealthKit, iAd, IdentityLookup[UI], ImageIO, ImageKit, Intents[UI] and IOSurface frameworks. (#8805) 2020-06-10 09:29:40 +02:00
generate-errors.csharp [build] generate Errors.Designer.cs for runtime assemblies (#8921) 2020-06-23 09:01:05 +02:00
generate-frameworks.csharp
generator-attribute-manager.cs [generator] Handle (ignore) C#8 special nullability attributes (#8384) 2020-04-14 16:54:20 -04:00
generator-attributes.cs [generator] Remove [RetainList] from generator-attributes and docs (#8746) 2020-06-03 20:15:43 -04:00
generator-diff.mk
generator-enums.cs [generator] Add C#8 nullability into generated code (#7570) (#8333) 2020-04-10 12:38:14 -04:00
generator-filters.cs [d16-7] [src] Remove the remaining Classic code. (#8820) 2020-06-11 19:25:18 +02:00
generator-typemanager.cs [bgen] Don't use assembly identity to identify attributes. (#8023) 2020-03-02 17:05:26 +01:00
generator.cs [generator] Fix potential warnings/errors when `[Sealed]` is used on types. Fix #9065 (#9782) 2020-10-05 22:01:36 -04:00
generator.csproj Add ikvm-fork as a submodule instead of using the sources embedded in the mono archive. (#9776) 2020-10-05 15:43:32 +02:00
generator.sln
glkit.cs [d16-7] [src] Remove Classic code from the GameController, GameKit, GameplayKit, GLKit, HealthKit, iAd, IdentityLookup[UI], ImageIO, ImageKit, Intents[UI] and IOSurface frameworks. (#8805) 2020-06-10 09:29:40 +02:00
global.css
healthkit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
healthkitui.cs
homekit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
iad.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
identitylookup.cs [identitylookup] Update for Xcode 12 beta 2 (#9063) 2020-07-13 08:39:15 -04:00
identitylookupui.cs [d16-7] [src] Remove Classic code from the GameController, GameKit, GameplayKit, GLKit, HealthKit, iAd, IdentityLookup[UI], ImageIO, ImageKit, Intents[UI] and IOSurface frameworks. (#8805) 2020-06-10 09:29:40 +02:00
imagecapturecore.cs
imageio.cs [imageio] Update Xcode 12 beta 3 (#9189) 2020-07-24 22:00:39 -04:00
imagekit.cs [d16-7] [src] Remove Classic code from the GameController, GameKit, GameplayKit, GLKit, HealthKit, iAd, IdentityLookup[UI], ImageIO, ImageKit, Intents[UI] and IOSurface frameworks. (#8805) 2020-06-10 09:29:40 +02:00
inputmethodkit.cs
intents.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
intentsui.cs [d16-7] [src] Remove Classic code from the GameController, GameKit, GameplayKit, GLKit, HealthKit, iAd, IdentityLookup[UI], ImageIO, ImageKit, Intents[UI] and IOSurface frameworks. (#8805) 2020-06-10 09:29:40 +02:00
iosurface.cs [iOSurface] Remove warning from the generator. (#9357) 2020-08-12 22:00:11 -04:00
ituneslibrary.cs [xcode11] [ItunesLibrary] macOS b1 bindings (#6602) 2019-07-22 09:51:53 -04:00
javascriptcore.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
linkpresentation.cs [xcode12][linkpresentation] Update for beta 1 (add tvOS support) (#8965) 2020-06-26 20:00:54 -04:00
localauthentication.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
mapkit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
mediaaccessibility.cs
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 [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
mediasetup.cs [mediasetup] Update for Xcode 12 beta 2 (#9087) 2020-07-16 20:34:19 -04:00
mediatoolbox.cs
messages.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
messageui.cs [MessageUI] Update framework to Xcode 12 beta 4. (#9315) 2020-08-07 06:15:22 -04:00
metal.cs [Metal][Generator] Fix the SetBuffers methods in protocols. Fixes #9649 (#9651) 2020-10-01 14:27:55 -04:00
metalkit.cs [MetalKit] Update framework for Xcode 12 beta4. (#9393) 2020-08-17 23:52:22 -04:00
metalperformanceshaders.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
metrickit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
mlcompute.cs [xcode12] Xcode 12 Beta 5 Initial bump (#9406) 2020-08-20 08:39:46 -04:00
mobilecoreservices.cs [LaunchServices] Update framework to Xcode 12 beta 4. (#9392) 2020-08-17 21:26:49 -04:00
modelio.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
multipeerconnectivity.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
naturallanguage.cs [naturallanguage] Update for Xcode 12 beta 3 (#9210) 2020-07-28 08:58:29 -04:00
nearbyinteraction.cs [NearbyInteraction][Xcode12] Add manual binding for NINearbyObjectDirectionNotAvailable (#9346) 2020-08-12 15:43:00 -04:00
network.cs [network][watchos] Enable Network.framework for watchOS (new in 6.0) (#6874) 2019-08-28 21:22:10 -04:00
networkextension.cs [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -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
opengles.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
opentk.csproj
packages.config [Localization] Add generator error messages (#7531) 2020-01-08 16:07:46 -05:00
passkit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
pdfkit.cs [Submission] Fix all the selectors that apple warns about. (#9268) (#9408) 2020-08-21 16:30:51 -04:00
pencilkit.cs [xcode12] Introspection-based fixes for Big Sur (#9632) 2020-09-15 08:56:24 -04:00
photos.cs [Photos] Correct nullability attributes for the Photos framework (#9740) 2020-10-01 08:42:44 +02:00
photosui.cs [PhotosUI][Xcode12] Update for beta 4 (#9285) 2020-08-06 11:29:30 -04:00
printcore.cs
pushkit.cs [pushkit] Update for Xcode 12 beta 2 (Catalyst only) (#9072) 2020-07-13 22:19:40 -04:00
qtkit.cs
quartzcomposer.cs [quartzcomposer] Update for Xcode 11 beta 1 (#6752) 2019-08-12 11:54:29 -04:00
quicklook.cs [d16-7] [xtro][bindings] Add xtro support for nullability and fix some bindings (#8341) 2020-04-10 12:37:16 -04:00
quicklookUI.cs [quicklookUI] xcode11 beta1 - beta3 updated bindings (#6588) 2019-07-16 19:28:42 -04:00
quicklookthumbnailing.cs [quicklookthumbnailing] Update for Xcode 12 beta 4 (#9388) 2020-08-17 13:43:00 -04:00
replaykit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
rosetta.pl
safariservices.cs [safariservices] Update for Xcode 12 beta 2 (#9053) 2020-07-10 08:55:03 -04:00
scenekit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
screentime.cs [ScreenTime] Update bindings to Xcode 12 Beta 5 (#9430) 2020-08-20 22:05:14 -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 [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
sensorkit.cs [sensorkit] Update for Xcode 12 beta 4 (#9378) 2020-08-17 08:23:06 -04:00
social.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
soundanalysis.cs [soundanalysis][watchos] Update to include last, missing API on watchOS now that AVFoundation is merged (#6939) 2019-09-09 14:16:04 -04:00
speech.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
spritekit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
storekit.cs [StoreKit] Update framework to Xcode 12 beta 4. (#9387) 2020-08-18 20:22:36 -04:00
systemconfiguration.cs
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 [tvservices] Update for Xcode 11 beta 1 (#6391) 2019-06-20 13:23:46 -07:00
tvuikit.cs [d16-7] [xtro][bindings] Add xtro support for nullability and fix some bindings (#8341) 2020-04-10 12:37:16 -04:00
twitter.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
uikit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
uniformtypeidentifiers.cs [uniformtypeidentifiers] Update for Xcode 12 beta 3 (#9181) 2020-07-24 13:38:44 -04:00
usernotifications.cs [tests][xtro] Add enum member/values checks. Fix #7527 (#9691) 2020-10-05 15:57:18 -04:00
usernotificationsui.cs [usernotificationsui] Update for Xcode 12 beta 3 (#9184) 2020-07-24 15:45:54 -04:00
videosubscriberaccount.cs [d16-7] [xtro][bindings] Add xtro support for nullability and fix some bindings (#8341) 2020-04-10 12:37:16 -04:00
videotoolbox.cs [VideoToolBox] Update framework to xcode 12 beta 5. (#9457) 2020-08-24 17:39:35 -04:00
vision.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
visionkit.cs fix header name 2019-08-27 20:25:33 -04:00
watchconnectivity.cs [d16-7] [xtro][bindings] Add xtro support for nullability and fix some bindings (#8341) 2020-04-10 12:37:16 -04:00
watchkit.cs [tests][intro] Detect cases where [Unavailable] is mis-used (#9871) 2020-10-15 08:57:47 -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 [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04:00
xamios.tmpl.csproj [d16-7] [src] Remove the remaining Classic code. (#8820) 2020-06-11 19:25:18 +02:00
xammac.pc.in
xammac.tmpl.csproj [d16-7] [src] Remove the remaining Classic code. (#8820) 2020-06-11 19:25:18 +02:00
xamtvos.tmpl.csproj [d16-7] [src] Remove the remaining Classic code. (#8820) 2020-06-11 19:25:18 +02:00
xamwatch.tmpl.csproj [d16-7] [src] Remove the remaining Classic code. (#8820) 2020-06-11 19:25:18 +02:00
xkit.cs [intro] check for duplicate or inconsistent availability attributes (#9825) 2020-10-13 14:16:33 -04: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