xamarin-macios/src
Sebastien Pouliot 80e6e63f87
[generator] Fix BI0000 from FormatException when no arguments are provided for an error (#7078)
Add new overloads so we can skip `String.Format` calls when relaying
messages without any arguments. Solve cases like

```
error BI0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
System.FormatException: Input string was not in a correct format.
  at System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x000b2] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-06/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Text/StringBuilder.cs:1445
...
```

because we failed compilation due to an (hidden) syntax error like:

```
foundation.cs(3627,3): error CS1519: Invalid token '{' in class, struct, or interface member declaration
```

where the `{` character is causing the `FormatException` inside the
generator sources.

This is now more properly reported as

```
error BI0002: bgen: Could not compile the API bindings.
	foundation.cs(3627,3): error CS1519: Invalid token '{' in class, struct, or interface member declaration
```
2019-09-24 09:08:05 -04:00
..
ARKit [arkit] Update for Xcode 11 beta 2 and beta 3 (#6460) 2019-07-04 07:33:37 +02:00
AVFoundation [coreaudio] Update for Xcode 11 (up to beta 7) (#6919) 2019-09-06 08:51:44 -04:00
AVKit [AVKit] Update for Xcode 11 up to beta 7 (#6748) 2019-08-28 10:24:02 -04:00
Accelerate PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
Accounts Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
AddressBook Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
AddressBookUI PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
AppKit Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
AssetsLibrary Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
AudioToolbox [coreaudio] Update for Xcode 11 GM (#6975) 2019-09-11 01:57:16 -07:00
AudioUnit Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07: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 [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
CFNetwork [CoreFoundation] Fix ownership of objects returned from CFHTTPMessageCreate* P/Invokes. (#6091) 2019-05-22 22:52:46 -07:00
CallKit PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
CarPlay [CarPlay] Update bindings to Xcode 10 Beta 2 2018-06-19 16:52:36 -05:00
Carbon PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
ClassKit Fix bindings since 15.7 does not use [p]mcs but csc 2018-05-29 17:40:16 -04:00
ClockKit [clockkit] Update for Xcode 11 beta 1 and 2 (#6405) 2019-06-25 10:33:16 -04:00
CloudKit [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
Compression [tests] Add introspection tests for Constants.*.cs.in. Fixes #5047 (#5159) 2018-11-22 13:24:55 -05:00
Contacts [contacts] xcode11 beta1 - beta4 updated bindings (#6563) 2019-07-23 18:50:18 -04:00
CoreAnimation Remove private API (#5915) 2019-04-25 10:16:22 -04:00
CoreBluetooth [corebluetooth] Update for Xcode 11 GM (#6990) 2019-09-12 13:40:46 -04:00
CoreData [CoreData] Add support up to Xcode11 beta 7. (#6896) 2019-09-04 09:32:29 -04:00
CoreFoundation [CFNetwork] Expose methods that were ignored until the dependencies were present. (#6201) 2019-07-26 21:21:03 +02:00
CoreGraphics [xcode11] Update with Xcode 10.3 changes and fix intro on iOS 12.4 (#6851) 2019-08-27 08:38:12 -04:00
CoreHaptics [CoreHaptics] Add support for the new framework up to beta 7. (#6943) 2019-09-10 13:03:26 -04:00
CoreImage [CoreFoundation] Fetch a few static values lazily. (#4924) 2018-10-09 15:51:17 +02:00
CoreLocation Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
CoreML [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
CoreMedia Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
CoreMidi [CoreMidi] Update framework to the latests Xcode11 beta 7. (#6908) 2019-09-05 09:39:56 -04:00
CoreMotion [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
CoreServices [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
CoreSpotlight [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
CoreTelephony [ios][coretelephony] Update for GM (#4803) 2018-09-13 03:56:20 -04:00
CoreText [coretext] Update for Xcode 11 GM (#6976) 2019-09-11 00:05:46 -07:00
CoreVideo Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
CoreWlan [corewlan][macos] Update for Xcode 11 beta 1 (#6779) 2019-08-15 11:51:14 -04:00
Darwin Merge branch 'xcode9.3' into d15-7-merge-xcode9.3 2018-03-29 19:31:01 -04:00
EventKit [eventkit] Obsolete `EKReminder` default constructor (#6768) 2019-08-14 13:10:20 -04:00
EventKitUI PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
ExternalAccessory Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
FinderSync PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
Foundation Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
GLKit [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
GameController [gamecontroller] Fix a few minor issues (#6728) 2019-08-06 21:42:22 -04:00
GameKit Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
GameplayKit [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
HealthKit [HealthKit] updates for beta 1 - beta 4 xcode11 (#6692) 2019-08-02 14:06:22 -04:00
HomeKit [homekit] Update for xcode11 beta1 to beta5 - all platforms (#6710) 2019-08-09 11:17:10 -04:00
IOSurface [IOSurface] Update for Xcode10-beta2 (#4322) 2018-06-22 16:41:11 +02:00
ImageCaptureCore [ImageCaptureCore] Add ImageCaptureCore Bindings (#5074) 2018-11-07 09:52:39 -05:00
ImageIO [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
ImageKit [macos][imagekit] Update for Xcode 11 beta 1 (#6772) 2019-08-14 22:06:24 -04:00
InputMethodKit PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
Intents [watchos][intents] Enable MediaPlayer related API (now enabled for watchOS) (#4505) 2018-07-26 08:38:12 -04:00
JavaScriptCore [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
LocalAuthentication [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
MapKit Fix broken introspection tests on macOS 10.15. Fixes #6998. (#6999) 2019-09-16 23:40:34 -07:00
MediaAccessibility [mediaaccessibility] Update for Xcode 11 beta 5 (#6733) 2019-08-07 19:40:32 -04:00
MediaLibrary PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
MediaPlayer [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
MediaToolbox Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
MessageUI PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
Metal Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
MetalKit [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
MetalPerformanceShaders [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
MobileCoreServices [coreservices] Update up to beta 5 (#4590) 2018-08-08 12:38:03 -04:00
ModelIO [ModelIO] Implement new API introduced with Xcode 11 b1-7. (#6930) 2019-09-09 13:15:07 -07:00
MultipeerConnectivity PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
NativeTypes Remove unnecessary Makefile targets that seem to conflict in "make package" 2019-03-16 02:47:40 +01:00
NaturalLanguage [naturallanguage] Update for Xcode 11 beta 1 (#6741) 2019-08-12 11:07:15 -04:00
Network Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
NetworkExtension [networkextension] Update for Xcode 11 beta 1 to 5 (#6788) 2019-08-16 14:18:40 -04:00
NewsstandKit [Newsstandkit] Update for Xcode 11 beta 1 (#6992) 2019-09-13 15:23:21 -04:00
NotificationCenter PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
ObjCRuntime Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
OpenGL [xcode10.2] [OpenGL] Fix MonoMacGameView .ctor when hardware acceleration isn't available (#5670) 2019-02-27 11:02:49 -05:00
OpenGLES Revert "Revert "[builds] Make the tools build use mono's packaged logic instead of our own. (#5962)" (#5971)" 2019-05-21 22:16:02 +02:00
PassKit Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
PdfKit Remove private API (#5915) 2019-04-25 10:16:22 -04:00
Photos [tests] Fix several issues that show up in the mtouch and introspection tests on macOS 10.15. (#6929) 2019-09-06 20:57:40 -04:00
PhotosUI [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
PrintCore Bind 2 high visibility PrintCore APIs (#4933) 2018-10-11 09:14:48 -05:00
QTKit PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
QuickLook [CoreFoundation] Fetch a few static values lazily. (#4924) 2018-10-09 15:51:17 +02:00
QuickLookUI PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
ReplayKit [replaykit] Update for Xcode 11 beta 6 (#6803) 2019-08-20 17:15:16 -04:00
SafariServices [safariservices] Update for Xcode 11 beta 1 to 5 (#6767) 2019-08-14 10:41:44 -04:00
SceneKit Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-11-16 14:26:50 -05:00
ScriptingBridge PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
SearchKit PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
Security [tests] Fix several issues that show up in the mtouch and introspection tests on macOS 10.15. (#6929) 2019-09-06 20:57:40 -04:00
Simd Merge xcode9 into d15-4[-xi] (#2710) 2017-09-15 17:53:16 -04:00
Social PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
SpriteKit [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
StoreKit Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
System.ComponentModel
System.Drawing Move System.Drawing types to Mono 2019-03-13 17:26:47 +01:00
System.Net.Http [httpclient] Change NSUrlSessionHandler and CFNetworkHandler to throw HttpRequestException. Fix #6439 (#6477) 2019-07-04 09:50:27 -04:00
SystemConfiguration Remove 10.7 & 10.8 availability attributes, since they're redundant now. 2018-10-25 17:12:39 +02:00
TVMLKit [TVMLKit] Work around Apple breaking API for enum values in TVElementUpdateType. (#5849) 2019-04-09 16:48:18 +02:00
TVServices PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
Twitter PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
UIKit Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
UserNotifications PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
VideoSubscriberAccount [videosubscriberaccount] Update for beta 1 (#4275) 2018-06-15 16:43:23 -04:00
VideoToolbox [xcode11] [VideoToolbox] bindings for beta 1-5 (#6645) 2019-08-06 05:29:11 -04:00
Vision [Vision] Update bindings to Xcode 11 Beta 1 - 6 (#6837) 2019-08-23 20:08:49 -04:00
WKWebKit [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
WatchConnectivity [watchconnectivity] Update for xcode 11 beta 1 (#6283) 2019-06-13 16:44:54 -04:00
WatchKit [xcode11] Remove the WatchKit framework from iOS while keeping API stability. Fixes #6492. (#6503) 2019-08-14 17:46:55 +02:00
WebKit [WebKit] Update bindings to Xcode 10 Beta 1, Nothing on beta 2 or 3 (#4443) 2018-07-13 21:19:57 -05:00
iAd Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
iTunesLibrary [xcode11] [ItunesLibrary] macOS b1 bindings (#6602) 2019-07-22 09:51:53 -04:00
.gitignore [generator] Build using csproj instead of manual csc command. Partial fix for #4384. 2018-08-23 17:33:56 +02:00
AssemblyInfo.cs.in [mtouch] Fix [InternalsVisibleTo] attribute parsing. Fixes #4895 (#4921) 2018-10-04 09:43:38 -04:00
Compat.iOS.cs
Constants.iOS.cs.in [MetricKit] Add new framework up to Xcode11 GM. (#6969) 2019-09-11 15:46:38 -04:00
Constants.mac.cs.in [CoreHaptics] Remove the framework from Mac OS X until we know better. (#6987) 2019-09-11 18:49:29 -04:00
Constants.tvos.cs.in [BackgroundTasks] Add new Framework for Xcode 11 beta 1. (#6438) 2019-07-02 15:54:21 +02:00
Constants.watch.cs.in [network][watchos] Enable Network.framework for watchOS (new in 6.0) (#6874) 2019-08-28 21:22:10 -04:00
Makefile Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
Makefile.generator Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
MonoNativeFunctionWrapperAttribute.cs PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
MonoPInvokeCallbackAttribute.cs PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
MonoTouch.NUnitLite.templ.csproj [build] Remove MT.D source build and replace it with a binary (#3957) 2018-04-23 13:08:58 -05:00
MonoTouch.NUnitLite.tvos.templ.csproj [build] Remove MT.D source build and replace it with a binary (#3957) 2018-04-23 13:08:58 -05:00
MonoTouch.NUnitLite.watchos.templ.csproj
Obsoletes.cs PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
OpenTK.dll.sources Move System.Drawing types to Mono 2019-03-13 17:26:47 +01:00
README.md [src] Use generated rsp files when executing the generator. 2018-08-23 17:33:41 +02:00
Version.in
accelerate.cs
accounts.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
addressbook.cs
addressbookui.cs PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
adsupport.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
appkit.cs Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
arkit.cs [ARKit] Update to Xcode 11 Beta 4 (#6608) 2019-07-18 12:23:51 -04:00
assetslibrary.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
audiotoolbox.cs
audiounit.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
authenticationservices.cs [authenticationservices] Remove [Abstract] from ASAuthorizationPasswordRequest. Fix #6816 (#6819) 2019-08-21 13:38:39 -04:00
avfoundation.cs Fix broken introspection tests on macOS 10.15. Fixes #6998. (#6999) 2019-09-16 23:40:34 -07:00
avkit.cs [AVKit] Update for Xcode 11 up to beta 7 (#6748) 2019-08-28 10:24:02 -04:00
backgroundtasks.cs [BackgroundTasks] Ensure requests are not abstract. (#6495) 2019-07-05 15:36:35 +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.in
btouch.cs Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
btouch.in
businesschat.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
bwatch.in
callkit.cs [xcode11] Bump for beta 6 (#6798) 2019-08-20 10:06:18 -04:00
carplay.cs [Xcode11] [carplay] Updates for beta 5 (#6678) 2019-08-30 11:08:42 -04:00
cfnetwork.cs [coreservices] Update up to beta 5 (#4590) 2018-08-08 12:38:03 -04:00
classkit.cs [classkit] Update for xcode 10.2 beta 1 (#5501) 2019-01-28 16:51:39 -05:00
clockkit.cs [clockkit] Update for Xcode 11 GM (#6972) 2019-09-11 01:47:23 -04:00
cloudkit.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
compression.cs [Compression] Add compression framework bindings. (#3942) 2018-05-11 15:54:31 -04:00
contacts.cs [src] Fix generic Contacts API. Fixes #6561. (#6895) 2019-09-03 22:47:51 -07:00
contactsui.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
coreanimation.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
coreaudiokit.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
corebluetooth.cs [corebluetooth] Update for Xcode 11 GM (#6990) 2019-09-12 13:40:46 -04:00
coredata.cs [CoreData] Add support up to Xcode11 beta 7. (#6896) 2019-09-04 09:32:29 -04:00
corefoundation.cs [corefoundation] Add missing CFStringTransform API. Fixes #5705 (#5712) 2019-03-06 08:04:17 -05:00
coregraphics.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
corehaptics.cs [CoreHaptics] Expose protocol method that was ignored due to inheritance. (#6986) 2019-09-11 20:44:36 -04:00
coreimage.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
corelocation.cs [corelocation] Update for Xcode 11 GM (#6973) 2019-09-10 23:51:56 -04:00
coremedia.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
coremidi.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
coreml.cs [CoreML] Update bindings to Xcode 11 Beta 1 - 5 (#6784) 2019-08-15 21:06:00 -04:00
coremotion.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
corenfc.cs [generator] Handle inheriting the same member from multiple protocols. Fixes #6366. (#6961) 2019-09-11 05:12:43 -07:00
coreservices.cs
corespotlight.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
coretelephony.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
coretext.cs [coretext] Update for Xcode 11 beta 5 (#6731) 2019-08-07 13:07:42 -04:00
corevideo.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
corewlan.cs Add xtro test for [Deprecated] attributes and fix up usages (#4966) 2019-01-29 15:37:48 -05:00
custom-make.sh
devicecheck.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
error.cs [generator] Fix BI0000 from FormatException when no arguments are provided for an error (#7078) 2019-09-24 09:08:05 -04:00
eventkit.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
eventkitui.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
executionpolicy.cs [executionpolicy] Update for Xcode 11 beta 1 (#6774) 2019-08-14 22:07:55 -04:00
externalaccessory.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
fileprovider.cs [fileprovider][macos] Update (remove some) API for Xcode 11 GM (#6974) 2019-09-10 23:34:35 -07:00
fileproviderui.cs [fileprovider[ui]] Update for Xcode 11 beta 1 to 5 (#6759) 2019-08-14 08:12:07 -04:00
findersync.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
foundation.cs Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
frameworks.sources Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
gamecontroller.cs [xcode11] Fix introspection tests running on 10.15 beta bots (#6866) 2019-08-28 11:48:08 -04:00
gamekit.cs [tests] Fix several issues that show up in the mtouch and introspection tests on macOS 10.15. (#6929) 2019-09-06 20:57:40 -04:00
gameplaykit.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
generate-frameworks.csharp [bgen] Make the Frameworks class instance based. 2019-04-11 18:02:13 +02:00
generator-attribute-manager.cs [generator] Remove support for Classic bindings. Partial fix for #6300. (#6643) 2019-07-24 09:01:40 -07:00
generator-attributes.cs [CoreFoundation, Network, Security] Address review comments 2018-07-31 16:30:23 -04:00
generator-diff.mk
generator-enums.cs [generator] Fix CS1522 warning building generated bindings (#6881) 2019-08-30 10:47:48 -04:00
generator-filters.cs [bgen] Make Generator.XamcoreVersion an instance property. 2019-04-11 18:02:13 +02:00
generator-typemanager.cs [generator] Remove support for Classic bindings. Partial fix for #6300. (#6643) 2019-07-24 09:01:40 -07:00
generator.cs [Generator] Provide clear error message on type mismatch with BindAs error (#7016) 2019-09-19 21:05:22 -04:00
generator.csproj Add symlink that points to current mono sdks dir (#6146) 2019-05-28 15:01:38 -04:00
generator.sln [tests] Port the makefile-based generator tests to NUnit. (#3019) 2017-11-20 14:55:16 +01:00
glkit.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
global.css
healthkit.cs [HealthKit] updates for beta 1 - beta 4 xcode11 (#6692) 2019-08-02 14:06:22 -04:00
healthkitui.cs PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
homekit.cs [homekit] Update for Xcode 11 GM (#6979) 2019-09-11 06:34:05 -04:00
iad.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
identitylookup.cs [identitylookup] Update for Xcode 11 beta 1 (#6511) 2019-07-08 09:24:09 -04:00
identitylookupui.cs [identitylookupui] Update for Xcode 11 beta 1 (#6510) 2019-07-08 09:25:46 -04:00
imagecapturecore.cs [ImageCaptureCore] Remove redundant availability attribute. 2018-11-20 08:41:36 +01:00
imageio.cs [imageio] Update for Xcode11 beta 7 (#6897) 2019-09-04 16:21:58 -04:00
imagekit.cs [ImageCaptureCore] Add ImageCaptureCore Bindings (#5074) 2018-11-07 09:52:39 -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 [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
intentsui.cs [xcode11] [IntentsUI] bindings for iOS beta1 (#6625) 2019-07-25 10:50:31 -04:00
iosurface.cs [IOSurface] Update for Xcode10-beta2 (#4322) 2018-06-22 16:41:11 +02:00
ituneslibrary.cs [xcode11] [ItunesLibrary] macOS b1 bindings (#6602) 2019-07-22 09:51:53 -04:00
javascriptcore.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
linkpresentation.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
localauthentication.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
mapkit.cs Fix broken introspection tests on macOS 10.15. Fixes #6998. (#6999) 2019-09-16 23:40:34 -07:00
mediaaccessibility.cs PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
medialibrary.cs [medialibrary] Update for Xcode 11 GM (#6977) 2019-09-11 01:56:47 -07:00
mediaplayer.cs [MediaPlayer] Enable API that depend on AVFoundation types for watchOS. Fixes #6597. (#6942) 2019-09-09 14:04:51 -07:00
mediatoolbox.cs
messages.cs [messages] Updates for beta 1 (#4230) 2018-06-12 13:59:46 -04:00
messageui.cs [messageui] Update for Xcode 11 beta 1 (#6377) 2019-06-20 06:14:14 -07:00
metal.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
metalkit.cs [metalkit] Update for Xcode 11 up to beta 7 (#6956) 2019-09-10 09:00:53 -04:00
metalperformanceshaders.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
metrickit.cs [MetricKit] Add new framework up to Xcode11 GM. (#6969) 2019-09-11 15:46:38 -04:00
mobilecoreservices.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
modelio.cs [ModelIO] Fix MDLAnimatedQuaternion bindings (#6991) 2019-09-12 10:53:42 -04:00
multipeerconnectivity.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
naturallanguage.cs [naturallanguage] Update for Xcode 11 beta 1 (#6741) 2019-08-12 11:07:15 -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 [xcode11] Fix introspection tests running on 10.15 beta bots (#6866) 2019-08-28 11:48:08 -04:00
newsstandkit.cs [Newsstandkit] Update for Xcode 11 beta 1 (#6992) 2019-09-13 15:23:21 -04:00
notificationcenter.cs [NotificationCenter] Bindings for iOS Xcode 11 beta 1 (#6579) 2019-07-16 15:58:34 -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 Move System.Drawing types to Mono 2019-03-13 17:26:47 +01:00
passkit.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07:00
pdfkit.cs [pdfkit] Update for Xcode 11 beta 1 (#6743) 2019-08-09 12:00:20 -04:00
pencilkit.cs [PencilKit] Update to Xcode 11 Beta 4 (#6612) 2019-07-18 13:40:37 -04:00
photos.cs [photos][macos] Fix breaking changes for XM (#6745) 2019-08-09 16:54:40 -04:00
photosui.cs [PhotosUI] Add Xcode 11 Beta 1 Binding (#6624) 2019-07-22 07:40:03 -04:00
printcore.cs
pushkit.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
qtkit.cs [Appkit] Fix xtro DesignatedInitializer output (#3474) 2018-02-14 08:09:43 -06:00
quartzcomposer.cs [quartzcomposer] Update for Xcode 11 beta 1 (#6752) 2019-08-12 11:54:29 -04:00
quicklook.cs [quicklookthumbnailing] Update for Xcode11 beta 1 to 5 (#6789) 2019-08-19 09:01:52 -04:00
quicklookUI.cs [quicklookUI] xcode11 beta1 - beta3 updated bindings (#6588) 2019-07-16 19:28:42 -04:00
quicklookthumbnailing.cs [quicklookthumbnailing] Update for Xcode11 beta 1 to 5 (#6789) 2019-08-19 09:01:52 -04:00
replaykit.cs Add xtro test for [Deprecated] attributes and fix up usages (#4966) 2019-01-29 15:37:48 -05:00
rosetta.pl
safariservices.cs [safariservices] Update for Xcode 11 beta 1 to 5 (#6767) 2019-08-14 10:41:44 -04:00
scenekit.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
scriptingbridge.cs PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
searchkit.cs PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
security.cs [security] Partial updates for Xcode 11 (up to beta 7) (#6867) 2019-08-29 08:17:06 -04:00
social.cs Bump the minimum iOS version to 7.0. Fixes #6213. (#6878) 2019-08-30 01:07:30 -07: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 [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
storekit.cs [storekit] Update for Xcode 11 GM (#6978) 2019-09-11 06:35:52 -04:00
system-drawing.sources Move System.Drawing types to Mono 2019-03-13 17:26:47 +01:00
systemconfiguration.cs [systemconfiguration][tvos] CaptiveNetwork API are now marked as prohibited in tvOS (#4357) 2018-06-29 09:35:05 -04:00
touch-unit.sources Switch to mono archive and remove submodule 2019-05-21 22:16:02 +02:00
tvmlkit.cs [tvmlkit] Update for Xcode 11 beta 1 (#6396) 2019-06-21 15:00:10 -04:00
tvservices.cs [tvservices] Update for Xcode 11 beta 1 (#6391) 2019-06-20 13:23:46 -07:00
tvuikit.cs [tvuikit] Update for Xcode 11 beta 1 (#6378) 2019-06-20 10:21:18 -07:00
twitter.cs PMCS Removal (#3197) 2018-02-05 10:26:29 -05:00
uikit.cs Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
usernotifications.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
usernotificationsui.cs [UserNotificationsUI] Update the fro Xcode 10. (#4268) 2018-06-18 16:05:20 +02:00
videosubscriberaccount.cs [videosubscriberaccount] Update for Xcode 11 beta 6 (#6800) 2019-08-20 14:43:01 -04:00
videotoolbox.cs [xcode11] Update with Xcode 10.3 changes and fix intro on iOS 12.4 (#6851) 2019-08-27 08:38:12 -04:00
vision.cs [Vision] Update bindings to Xcode 11 Beta 1 - 6 (#6837) 2019-08-23 20:08:49 -04:00
visionkit.cs fix header name 2019-08-27 20:25:33 -04:00
watchconnectivity.cs [watchconnectivity] Update for xcode 11 beta 1 (#6283) 2019-06-13 16:44:54 -04:00
watchkit.cs [watchkit] Update for Xcode 11 up to beta 7 (#6882) 2019-08-30 14:29:24 -04:00
webkit.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
wkwebkit.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -04:00
xamios.tmpl.csproj [src] Update csproj templates for platform assemblies to build correctly. (#3417) 2018-02-07 21:51:50 +01:00
xammac.pc.in
xammac.tmpl.csproj Remove unnecessary references to Mono.Security. (#5242) 2018-12-11 10:35:16 +01:00
xamtvos.tmpl.csproj [src] Update csproj templates for platform assemblies to build correctly. (#3417) 2018-02-07 21:51:50 +01:00
xamwatch.tmpl.csproj [src] Update csproj templates for platform assemblies to build correctly. (#3417) 2018-02-07 21:51:50 +01:00
xkit.cs [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595) 2019-07-16 12:13:11 -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 master'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
monotouch.dll IPHONE MONOTOUCH IOS
Xamarin.iOS.dll IPHONE MONOTOUCH IOS XAMCORE_2_0
XamMac.dll MONOMAC XAMARIN_MAC
Xamarin.Mac.dll MONOMAC XAMARIN_MAC XAMCORE_2_0
Xamarin.WatchOS.dll IPHONE MONOTOUCH WATCH XAMCORE_2_0 XAMCORE_3_0
Xamarin.TVOS.dll IPHONE MONOTOUCH TVOS XAMCORE_2_0 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
XAMCORE_2_0 defined for the Unified assemblies; this should be used for most conditions dealing with API differences between Unified and Classic assemblies
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