-
Notifications
You must be signed in to change notification settings - Fork 549
.NET release notes Xcode 13.3
We're excited to announce our first SDK release for .NET! After many years of work we've moved to .NET, where among other things we'll get an updated Base Class Library, which is unified across all .NET platforms.
Note: these are the base SDKs that add support for the platforms in question, for MAUI (which is built on top of our SDKs), go here instead: https://docs.microsoft.com/en-us/dotnet/maui/.
Getting Started | What's New | Known Issues | Feedback | FAQ
It's highly recommended to use Xcode 13.3+ (which requires macOS 12.0 (Monterey)). Earlier versions of Xcode may work, but some featuers won't be available.
Minimum supported OS versions:
- iOS: 10.0
- macOS: 10.14
- tvOS: 10.0
- Mac Catalyst: 13.1
In contrast to how Xamarin.iOS and Xamarin.Mac were shipped (as installable *.pkg files), our .NET SDKs are shipped as workloads in the .NET world. This means that the first step is to getting started is to install .NET 6.0.300 (or later).
Then install the workload corresponding with the desired platform:
$ dotnet workload install ios # other workloads: macos, tvos, and maccatalystCreate new app from a template with:
$ dotnet new ios # 'dotnet new --list --tag Mobile' will show all available templatesFinally build and run the new app in the simulator
$ dotnet runThis release contains SDKs for the following four platforms: iOS, tvOS, Mac Catalyst and macOS, and has support and bindings for the OS versions that were shipped with Xcode 13.3:
- iOS 15.4
- macOS 12.3
- tvOS 15.4
- Mac Catalyst 15.4
Everything.
- Added support for arm64 in the iOS and tvOS simulator when running on an ARM64-capable Mac.
- Added support for arm64 for macOS projects. Note that the default is to always build for x64, to build for arm64 set the runtime identifier to
osx-arm64:
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>We've removed the dependency on OpenTK, a long-standing community request: https://github.com/xamarin/xamarin-macios/issues/13160
.NET 6 ships with a linker which is shared between all platforms. This linker is very similar to the linker in Xamarin.iOS and Xamarin.Mac (it has the same origin), but since it's used by more platforms across Microsoft, it will be updated and improved much more.
For compatibility reasons most of the old linker modes continue to work as-is: LinkSdk, None and Full. There was a Platform mode for Xamarin.Mac, which is not supported anymore, Most of the old linker modes still work
"Platform" mode is gone for macOS.
"LinkSdk", "None" and "Full" are still available for all platforms.
manual mode is also available.
The macOS SDK is using the CoreCLR runtime instead of the Mono runtime.
There are a few known incompatibilities between CoreCLR and Mono, those are listed here.
We've added support for Mac Catalyst. Use the net6.0-maccatalyst target framework to create a Mac Catalyst app.
Because iOS and Mac Catalyst are so close API-wise, we define both __IOS__ and __MACCATALYST__.
The system version for Mac Catalyst (as returned by UIDevice.CurrentDevice.SystemVersion) is the macOS version the app is executing on.
However, the helper method UIDevice.CurrentDevice.CheckSystemVersion takes the corresponding iOS version (like the .NET availability API does).
We've enabled exception marshalling by default, because it prevents numerous potential problems (crashes, memory corruption, memory leaks, etc.)
However, there is a performance difference when calling into Objective-C code. In the future we'll make it possible to avoid this performance difference (at the cost of a slightly bigger app), but in the meantime it's possible to disable Objective-C exception marshalling by adding the following property to a PropertyGroup in your project file:
<MtouchExtraArgs>--marshal-objectivec-exceptions:disable</MtouchExtraArgs>First release!
See Breaking Changes
See [Known issues in .NET](Known issues in .NET)
File issues here: https://github.com/xamarin/xamarin-macios/issues/new.
We'll continue to ship Xamarin.iOS and Xamarin.Mac separately for a while, but they will eventually be discontinued.
Ref: <link to blog post? documentation?>
This will create an *.ipa (for iOS and tvOS) or *.pkg (for macOS and Mac Catalyst) for publishing to the App Store:
$ dotnet publishWe support creating universal apps for the following platforms:
- iOS:
ARMv6+ARM64. - macOS:
x86_64+ARM64. - Mac Catalyst:
x86_64+ARM64.
In order to create a universal app, set the RuntimeIdentifiers property (plural, don't confuse with RuntimeIdentifier) to the corresponding runtime identifiers. For instance for macOS, that would be:
<PropertyGroup>
<!-- for macOS -->
<RuntimeIdentifiers>osx-x64;osx-arm64</RuntimeIdentifiers>
<!-- for Mac Catalyst -->
<RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers>
<!-- for iOS -->
<RuntimeIdentifiers>ios-arm;ios-arm64</RuntimeIdentifiers>
</PropertyGroup>