Bridges the worlds of .NET with the native APIs of macOS, iOS, tvOS, and watchOS.
Перейти к файлу
Sebastien Pouliot fe49e3a112
[uikit] More linker-friendly `UIControl` (#11872)
The `RemoveTarget` method already checked if `allTargets` was `null`,
even if it was not possible (might have been at some point in time)

It makes some apps, like the one we track for the minimal size, able
to eliminate a few more types (for both _dotnet_ and _legacy_)

```diff
--- a.cs	2021-06-08 17:41:00.000000000 -0400
+++ b.cs	2021-06-08 17:41:02.000000000 -0400
@@ -3216,21 +3216,9 @@
 			NSString.ReleaseNative(intPtr);
 		}
 	}
-	[Register]
-	internal class UIControlEventProxy : NSObject
-	{
-		[MethodImpl(8)]
-		[Export("BridgeSelector")]
-		public void Activated()
-		{
-			throw new NotSupportedException("Linked away");
-		}
-	}
 	[Register("UIControl", true)]
 	public class UIControl : UIView, INativeObject, IDisposable
 	{
-		private static ConditionalWeakTable<UIControl, Dictionary<EventHandler, Dictionary<UIControlEvent, UIControlEventProxy>>> allTargets = new ConditionalWeakTable<UIControl, Dictionary<EventHandler, Dictionary<UIControlEvent, UIControlEventProxy>>>();
-
 		private static readonly IntPtr class_ptr = Class.GetHandle("UIControl");

 		public override IntPtr ClassHandle => class_ptr;
@@ -3523,32 +3511,6 @@
 	}
 	[Flags]
 	[Native]
-	public enum UIControlEvent : ulong
-	{
-		TouchDown = 0x1,
-		TouchDownRepeat = 0x2,
-		TouchDragInside = 0x4,
-		TouchDragOutside = 0x8,
-		TouchDragEnter = 0x10,
-		TouchDragExit = 0x20,
-		TouchUpInside = 0x40,
-		TouchUpOutside = 0x80,
-		TouchCancel = 0x100,
-		ValueChanged = 0x1000,
-		PrimaryActionTriggered = 0x2000,
-		MenuActionTriggered = 0x4000,
-		EditingDidBegin = 0x10000,
-		EditingChanged = 0x20000,
-		EditingDidEnd = 0x40000,
-		EditingDidEndOnExit = 0x80000,
-		AllTouchEvents = 0xFFF,
-		AllEditingEvents = 0xF0000,
-		ApplicationReserved = 0xF000000,
-		SystemReserved = 0xF0000000,
-		AllEvents = 0xFFFFFFFF
-	}
-	[Flags]
-	[Native]
 	public enum UIControlState : ulong
 	{
 		Normal = 0x0,
@@ -4737,10 +4699,6 @@

 		public bool IsWrapper => is_wrapper;

-		public RegisterAttribute()
-		{
-		}
-
 		public RegisterAttribute(string P_0)
 		{
 			name = P_0;
```
2021-06-09 08:50:14 -04:00
.github/workflows changing the branch (#11826) 2021-06-04 14:39:03 -05:00
Localize [Localization] Cherry Picking lcl files (#11682) 2021-05-26 13:59:55 -05:00
builds [configure] Add option to use a locally built dotnet/runtime. (#11643) 2021-05-21 22:18:25 +02:00
docs [configure] Add option to use a locally built dotnet/runtime. (#11643) 2021-05-21 22:18:25 +02:00
dotnet [dotnet] Add a data/UnixFilePermissions.xml file to the sdk packs. Fixes #11860. (#11869) 2021-06-09 07:54:18 +02:00
eng [main] Update dependencies from dotnet/installer (#11747) 2021-06-02 07:48:29 +02:00
external Bump Touch.Unit. (#11648) 2021-05-21 15:12:09 +02:00
fsharp Add config file for libmono-native dllmap 2019-03-13 00:34:47 +01:00
jenkins [CI] Re-enable API and Generator diff. (#11187) 2021-04-29 17:53:06 -04:00
mk [main][mono] Bump mono to HEAD of 2020-02 to match android (#11716) 2021-06-02 18:59:09 -04:00
mono Add config file for libmono-native dllmap 2019-03-13 00:34:47 +01:00
msbuild [dotnet] Remove workaround for dotnet/runtime issue with incorrect dylibs. (#11815) 2021-06-07 08:35:17 +02:00
opentk Xamarin.Mac native Apple Silicon targetting support (#10115) 2021-03-17 21:48:02 -04:00
runtime [runtime] Disable LOG_MONOVM logging by default. (#11796) 2021-06-03 18:45:21 +02:00
src [uikit] More linker-friendly `UIControl` (#11872) 2021-06-09 08:50:14 -04:00
tests [tests] Collect and zip up the .NET unit tests for execution on Windows. (#11850) 2021-06-08 08:59:10 +02:00
tools [CI] Unify the password across templates. (#11854) 2021-06-07 18:37:44 -04:00
.editorconfig [editorconfig] Set the charset to utf-8. (#11795) 2021-06-03 18:45:29 +02:00
.gitignore [build] Use arcade dependency management tooling (#10890) 2021-04-02 00:02:27 -04:00
.gitmodules Fix submodules and disable AddressBookTests in MacCat 2021-04-06 20:47:17 -04:00
CODEOWNERS [tests] Merge the msbuild-mac tests into the Xamarin.MacDev.Tests project. (#10129) 2020-12-04 13:05:51 +01:00
ISSUE_TEMPLATE.md Instruction to find the build logs (#6871) 2019-08-29 10:42:14 -04:00
LICENSE Adjust license to match requested format 2016-04-25 16:38:57 -04:00
Make.config [main][mono] Bump mono to HEAD of 2020-02 to match android (#11716) 2021-06-02 18:59:09 -04:00
Make.versions [Versions] Bump version after d16-10 branch creation 2021-04-25 22:20:21 -04:00
Makefile [CI] Upload build asset data to darc/maestro (#11189) 2021-04-14 17:34:30 -04:00
NOTICE.txt Add NOTICE.txt and cgmanifest tool (#8843) 2020-06-12 14:30:21 -05:00
NuGet.config [tests] Add a performance test using BenchmarkDotNet. (#11298) 2021-04-23 13:29:06 +02:00
README.md Update the README with download links for d16-8 and d16-9 packages. (#11529) 2021-05-13 18:37:12 +02:00
SECURITY.MD Add SECURITY.MD to repo (as suggested by OSPO) (#7019) 2019-09-19 17:44:22 -04:00
Versions-ios.plist.in Merge remote-tracking branch 'xamarin/xcode12.5' into alex-xcode12.5-main 2021-04-02 21:46:31 -04:00
Versions-mac.plist.in [xcode12.5] Initial bump for beta 1 (#10573) 2021-02-05 20:30:24 -05:00
Xamarin.Mac.sln Fix path to dont link project in Xamarin.Mac.sln. (#8109) 2020-03-16 09:42:52 +01:00
Xamarin.iOS.sln [tests] Make the mtouch test project reference the actual mtouch project. (#11400) 2021-05-04 14:10:03 +02:00
banner.png [README] Add Xamarin.iOS + Xamarin.Mac banner (#1665) 2017-02-08 17:42:48 -05:00
configure [configure] Add option to use a locally built dotnet/runtime. (#11643) 2021-05-21 22:18:25 +02:00
global.json [build] Use arcade dependency management tooling (#10890) 2021-04-02 00:02:27 -04:00
mac-entitlements.plist Implement notarization. (#6928) 2019-09-09 00:34:11 -07:00
product.snk
system-dependencies.sh [Build] Add a rule to execute the first run of Xcode. Why copy paste a command? (#11180) 2021-04-09 21:41:29 -04:00
versions-check.csharp [versions-check.csharp] Improve this script a bit (#10323) 2021-01-11 10:47:57 +01:00

README.md

Xamarin.iOS + Xamarin.Mac logo

Xamarin.iOS & Xamarin.Mac

Welcome!

This module is the main repository for both Xamarin.iOS and Xamarin.Mac.

These SDKs allow us to create native iOS, tvOS, watchOS and macOS applications using the same UI controls we would in Objective-C and Xcode, except with the flexibility and elegance of a modern language (C#), the power of the .NET Base Class Library (BCL), and two first-class IDEs—Visual Studio for Mac and Visual Studio—at our fingertips.

This repository is where we do development for the Xamarin.iOS and Xamarin.Mac SDKs. There are a few ways that you can contribute, for example:

Contributing

If you are interested in fixing issues and contributing directly to the code base, please see the document How to Contribute, which covers the following:

Downloads

The preferred method for installing Xamarin.iOS and Mac is to use the Visual Studio installers (Windows, Mac).

The team also strongly recommends using the latest Xamarin SDK and Xcode whenever possible.

However, we provide links to older Xamarin.iOS and Mac packages for macOS downgrades and build machine configuration.

Version Xamarin.iOS Xamarin.Mac
d16.9 (Xcode 12.5) 14.16.0.5 7.10.0.5
d16.9 14.14.2.5 7.8.2.5
d16.8 (Xcode 12.4) 14.10.0.4 7.4.0.10
d16.8 (Xcode 12.3) 14.8.0.3 7.2.0.3
d16.8 (Xcode 12.2) 14.6.0.15 7.0.0.15
d16.8 14.4.1.3 6.22.1.26
d16.7 14.2.0.12 6.20.2.2
d16.6 13.18.2.1 6.18.2.1
d16.5 13.16.0.13 6.16.0.13
d16.4 13.10.0.21 6.10.0.21
d16.3 13.6.0.12 6.6.0.12
d16.2 12.14.0.114 5.14.0.114
d16.1 12.10.0.157 5.10.0.157
d16.0 12.8.0.2 5.8.0.0

Feedback

Discord

License

Copyright (c) .NET Foundation Contributors. All rights reserved. Licensed under the MIT License.