简体   繁体   English

如何在xamarin.forms中使用CoreNFC?

[英]How to use CoreNFC in xamarin.forms?

I'm totally new in xamarin. 我是xamarin的新手。

I'm trying to use CoreNFC in my xamarin.forms multiplatform app. 我正在尝试在xamarin.forms多平台应用程序中使用CoreNFC。

But I don't know how to do it because i can only import CoreNfc in myapp.ios and not in myapp. 但是我不知道该怎么做,因为我只能在myapp.ios中导入CoreNfc,而不能在myapp中导入。

There is someone that know how to do it ? 有人知道该怎么做吗?

Thanks in advance! 提前致谢!

Core NFC belongs to the iOS Framework, so you can import and use it only in our iOS Project. 核心NFC属于iOS框架,因此您只能在我们的iOS项目中导入和使用它。

You could implement the NFC feature on each platform you want to support and use a interface and the Xamarin Dependency Service, to have access to these platform specific implementations in your shared code. 您可以在要支持的每个平台上实现NFC功能,并使用接口和Xamarin Dependency Service,以便在共享代码中访问这些平台特定的实现。

Or you look around for a plugin which did this work for you. 或者,您到处寻找能为您完成此工作的插件。 A starting point could be NFCForms from poz1. 起点可以是poz1中的NFCForms。 But if I remember well it has so far only support for Android and Windows Phone. 但是,如果我记得很好,它到目前为止仅支持Android和Windows Phone。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM