[英]Xamarin.Essentials causes crash in Xamarin.Forms.macOS
在遵循本指南后,我正在構建 Xamarin.Forms.MacOS 應用程序: https://docs.microsoft.com/svios-se/tabs=windowsentials
在這個應用程序中,我想使用 Xamarin.Essentials。 我可以成功地將這個 package 添加到我的 macOS 項目中,但是在啟動過程中我遇到了以下錯誤消息:
This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.
我試圖添加代碼片段:
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
在 macOS 的AppDelegate
文件中的public override void DidFinishLaunching(NSNotification notification)
方法中,但是在查找.Platform
的引用時存在問題。
我如何使 Xamarin.Essentials 適用於 macOS 的 Xamarin forms?
Xamarin.Essentials 目前不支持 macOS。 自 2018 年以來,這一直是一個懸而未決的問題,因為該平台沒有官方贊助商,也沒有 Linux、WinForms 等......
iOS - Supported By Microsoft
Android - Supported By Microsoft
UWP - Supported By Microsoft
macOS
WinForms/WPF
GTK#
Tizen - Supported by Samsung
watchOS - Supported By Microsoft
tvOS - Supported By Microsoft
額外的平台支持 #662
macOS 支持 #111
注意:這在 Essentials 的 v1.6 版本中可能會有所改變,但官方文檔中仍未列出: https://docs.microsoft.com/en-us/xamarin/essentials/platform-feature-support
注意:有一些“非官方”分支提供了對 macOS 的相當完整的支持,您需要克隆,可能與官方 repo 合並並自己構建它。 查看支持 macOS 的個人分叉的上述 github 問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.