Bridges the worlds of .NET with the native APIs of macOS, iOS, tvOS, and watchOS.
Перейти к файлу
Sebastien Pouliot 4eda43b1c9
[msbuild] Fix semi-conflicting options to set codesign timestamp (#10428)
TL&DR:

This effectively change nothing - but prevents (warn) if both options
contradict themselves.

Long Story....

So we have two ways to control the codesign's `--timetamp` option but
they both ignore each other so we can end up with the option being
set more than once at build time.

`DisableTimestamp` was the original one. It was meant for iOS (and
derivative OS) and disable the option (which requires the network)
for simulator or debug builds. IOW we _wanted_ timestamps when doing
release builds for devices.

```
DisableTimestamp="$(_CodesignDisableTimestamp)"
```

```
<_CodesignDisableTimestamp>False</_CodesignDisableTimestamp>
<_CodesignDisableTimestamp Condition="'$(_SdkIsSimulator)' == 'true' Or '$(_BundlerDebug)' == 'true'">True</_CodesignDisableTimestamp>
```

Now disabling the timestamp did not mean it was enabled. We did not ask
for a timestamp, leaving it to the default which from `man codesign`
means:

> If this option is not given at all, a system-specific default behavior is invoked.
> This may result in some but not all code signatures being timestamped.

Then `UseSecureTimestamp` was added for macOS builds. If hardening is
enabled then a secure timestamp is required.

`msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets` `_CodesignAppBundle`

```
UseSecureTimestamp="$(UseHardenedRuntime)"
```

However it's also exposed for iOS (shared target) in
`msbuild/Xamarin.Shared/Xamarin.Shared.targets` `__CodesignNativeLibraries`
but it would always be `false` in that case.

Adding this option means there's now always a `--timestamp` option given,
either to enable it (no URL so it means using Apple's server) or to
disable it (`=none`) but since it's controlled by `UseHardenedRuntime`,
which is macOS only, then iOS device builds are never timestamped.

An alternative would be to have `UseSecureTimestamp` as a macOS-only
option - but that would change how we currently sign the iOS applications
and I'd rather not change things that are known to work.
2021-01-15 10:43:11 -05:00
.github/workflows [Actions] Add the user to all branches. Remove monojenkins. (#10368) 2021-01-08 16:21:41 -05:00
builds [builds] Create the cache directory if needed. (#10372) 2021-01-11 16:25:56 +01:00
docs [docs] Clarify optional protocol support with class vs interface (#10021) 2020-12-03 13:38:46 -05:00
dotnet [dotnet] Add default exclusions for recursive patterns to not pick up files in the bin/obj directories. (#10422) 2021-01-15 08:25:42 +01:00
external [msbuild] Unify handling of Sdks. (#10375) 2021-01-13 11:44:11 +01:00
fsharp Add config file for libmono-native dllmap 2019-03-13 00:34:47 +01:00
jenkins [VSTS] Move away from Jenkins to VSTS pipelines for xamarin-macios. (#10302) 2021-01-06 10:48:54 -05:00
mk Bump to .NET 6.0.100-alpha.1.21060.3. (#10388) 2021-01-14 14:07:28 +01:00
mono Add config file for libmono-native dllmap 2019-03-13 00:34:47 +01:00
msbuild [msbuild] Fix semi-conflicting options to set codesign timestamp (#10428) 2021-01-15 10:43:11 -05:00
opentk [src] Generate a define for each framework for every platform. (#10171) 2020-12-01 11:14:32 +01:00
runtime [src] Build Xamarin.MacCatalyst.dll 2020-12-03 10:43:19 +01:00
src Bump to .NET 6.0.100-alpha.1.21060.3. (#10388) 2021-01-14 14:07:28 +01:00
tests [msbuild] Fix semi-conflicting options to set codesign timestamp (#10428) 2021-01-15 10:43:11 -05:00
tools [CI][VSTS] If comments are too large, provide a gist. (#10431) 2021-01-14 18:33:22 -05:00
.editorconfig Add .editorconfig (#8058) 2020-03-10 11:24:46 -04:00
.gitignore [CI][VSTS] Rename path to fix API diff (#10384) 2021-01-12 11:32:26 -05:00
.gitmodules Fix submodules. 2020-10-20 17:30:24 -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 Bump to .NET 6.0.100-alpha.1.21060.3. (#10388) 2021-01-14 14:07:28 +01:00
Make.versions [versions] Add back the MACCATALYST_NUGET_VERSION var 2020-12-16 08:21:49 -05:00
Makefile [dotnet] Bump to .NET 6.0.100-alpha.1.20556.2. and net6.0 2020-11-10 11:41:06 +01:00
NOTICE.txt Add NOTICE.txt and cgmanifest tool (#8843) 2020-06-12 14:30:21 -05:00
NuGet.config [src] Build the .NET version of our product assemblies using a .NET 5 BCL. (#9637) 2020-09-21 13:22:44 +02:00
README.md [README] Bump downloads to our new Xamarin.iOS stable (#9981) 2020-10-28 07:35:47 -04: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.3' into main 2020-12-15 23:50:18 -05:00
Versions-mac.plist.in [xcode12.3] Initial bump to Xcode 12.3 Beta 1 (#10135) 2020-11-23 09:48:06 -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 [src] Use `Runtime.NSLog` instead of `System.Console.WriteLine` (#8626) 2020-05-20 13:38:44 -04:00
banner.png [README] Add Xamarin.iOS + Xamarin.Mac banner (#1665) 2017-02-08 17:42:48 -05:00
configure [DevOps] Add debugging messages from when we fail the ./configure (#9102) 2020-07-15 20:13:57 -04:00
mac-entitlements.plist Implement notarization. (#6928) 2019-09-09 00:34:11 -07:00
product.snk Add our mono runtimes to the build. 2016-04-24 14:47:24 -04:00
system-dependencies.sh [system-dependencies] Only use the locally installed .NET version. (#9885) 2020-10-16 08:23:22 +02: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.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.