热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

使用iPhone6/iOS8阅读NFC标签-ReadingNFCTagswithiPhone6/iOS8

NowthatApplejustannouncedtheiPhone6willhaveanNFCchip,doesanyoneknowifiOS8willena

Now that Apple just announced the iPhone 6 will have an NFC chip, does anyone know if iOS 8 will enable reading/detecting RFID tags for the iPhone 6 device? Anyone have any details to share on this?

既然Apple刚刚宣布iPhone 6将配备NFC芯片,那么有谁知道iOS 8是否能够为iPhone 6设备读取/检测RFID标签?有人有任何细节可以分享吗?

7 个解决方案

#1


163  

The iPhone6/6s/6+ are NOT designed to read passive NFC tags (aka Discovery Mode). There's a lot of misinformation on this topic, so I thought to provide some tangible info for developers to consider. The lack of NFC tag read support is not because of software but because of hardware. To understand why, you need to understand how NFC works. NFC works by way of Load Modulation. That means that the interrogator (PCD) emits a carrier magnetic field that energizes the passive target (PICC). With the potential generated by this carrier field, the target then is able to demodulate data coming from the interrogator and respond by modulating data over top of this very same field. The key here is that the target never creates a field of its own.

iPhone6 / 6s / 6 +并非设计用于读取被动NFC标签(又称发现模式)。关于这个话题有很多错误的信息,所以我想提供一些有形的信息供开发人员考虑。缺乏NFC标签读取支持不是因为软件而是因为硬件。要了解原因,您需要了解NFC的工作原理。 NFC通过负载调制工作。这意味着询问器(PCD)发射载波磁场,其激励被动目标(PICC)。利用该载波场产生的电势,目标然后能够解调来自询问器的数据并通过在该同一场的顶部调制数据来进行响应。这里的关键是目标永远不会创建自己的领域。

If you look at the iPhone6 teardown and parts list you will see the presence of a very small NFC loop antenna as well as the use of the AS3923 booster IC. This design was intended for custom microSD or SIM cards to enable mobile phones of old to do payments. This is the type of application where the mobile phone presents a Card Emulated credential to a high power contactless POS terminal. The POS terminal acts as the reader, energizing the iPhone6 with help from the AS3923 chip. The AS3923 block diagram clearly shows how the RX and TX modulation is boosted from a signal presented by a reader device. In other words the iPhone6 is not meant to provide a field, only to react to one. That's why it's design is only meant for NFC Card Emulation and perhaps Peer-2-Peer, but definitely not tag Discovery.

如果你看看iPhone6的拆解和零件清单,你会看到一个非常小的NFC环形天线的存在以及AS3923增强器IC的使用。此设计旨在用于定制microSD或SIM卡,以使旧手机能够进行支付。这是一种应用类型,其中移动电话向高功率非接触式POS终端提供卡仿真凭证。 POS终端充当阅读器,在AS3923芯片的帮助下激活iPhone6。 AS3923框图清楚地显示了RX和TX调制如何从读取器设备呈现的信号中提升。换句话说,iPhone6并不是为了提供一个领域,只是为了对一个领域做出反应。这就是为什么它的设计仅适用于NFC卡仿真,也许是Peer-2-Peer,但绝对不是标签Discovery。

AS3923 booster IC

There are some alternatives to achieving tag Discovery with an iPhone6 using HW accessories. I talk about these integrations and how developers can architect solutions in this blog post. Our low power reader designs open interesting opportunities for mobile engagement that few developers are thinking about.

使用硬件配件的iPhone6实现标签发现有一些替代方案。我将讨论这些集成以及开发人员如何在此博客文章中构建解决方案。我们的低功耗阅读器设计为移动互动提供了一些有趣的机会,很少有开发人员在考

Disclosure: I'm the founder of Flomio, Inc., a TechStars company that delivers proximity ID hardware, software, and services for applications ranging from access control to payments.

披露:我是Flomio,Inc。的创始人,该公司是一家TechStars公司,为访问控制和支付等应用提供邻近ID硬件,软件和服务。

Update: This rumor, if true, would open up the possibility for the iPhone to practically support NFC tag Discovery mode. An all glass design would not interfere with the NFC antenna as does the metal back of the current iPhone. We've attempted this design approach --albeit with cheaper materials-- on some of our custom reader designs with success so looking forward to this improvement.

更新:如果这个传闻属实,将为iPhone提供实际支持NFC标签发现模式的可能性。全玻璃设计不会像现有iPhone的金属背一样干扰NFC天线。我们尝试了这种设计方法 - 尽管用更便宜的材料 - 在我们的一些定制读卡器设计上取得了成功,因此期待这种改进。

Update: iOS11 has announced support for "NFC reader mode" for iPhone7/7+. Details here. API only supports reading NDEF messages (no ISO7816 APDUs) while an app is in the foreground (no background detection). Due out in the Fall, 2017... check the screenshot from WWDC keynote:

更新:iOS11宣布支持iPhone7 / 7 +的“NFC阅读器模式”。细节在这里。 API仅支持在应用程序位于前台(无背景检测)时读取NDEF消息(无ISO7816 APDU)。将于2017年秋季发布...查看WWDC主题演讲截图:

enter image description here

#2


42  

From digging into the iOS 8 docs that are available as of Sept 9th 3:30pm there is no mention of developer access to the NFC controller to perform any NFC operations; that includes reading tags, writing tags, pairing, payments, tag emulation... Given its an NXP controller the hardware has the capability to perform these features. They did mention a 3rd party app for the watch that allowed a hotel guest to open their room door with NFC. This is a classic use case for NFC and gives some indication that the NFC controller will be open to developers at some point. Remember, the watch is not supposed to be released until Q1 2015. So for now I'd say it's closed but will be open soon. Given the 'newness' of contactless payments for the general US consumer and the recent security breaches its not surprising Apple wants to keep this closed for a while.

从挖掘到截至9月9日下午3:30的iOS 8文档,没有提到开发人员访问NFC控制器以执行任何NFC操作;其中包括阅读标签,书写标签,配对,付款,标签模拟......鉴于其具有恩智浦控制器,硬件具有执行这些功能的能力。他们确实提到了第三方应用程序,允许酒店客人用NFC打开他们的房间门。这是NFC的经典使用案例,并提供了一些迹象表明NFC控制器将在某些时候向开发人员开放。请记住,手表不应该在2015年第一季度发布。所以现在我说它已经关闭但很快就会开放。鉴于美国普通消费者的非接触性付款的“新颖性”以及最近的安全漏洞,苹果希望暂时关闭这一点并不奇怪。

Disclosure: Im the CEO of GoToTags, an NFC company with obvious vested interest in Apple opening up NFC to developers.

披露:我是GoToTags的首席执行官,GoToTags是一家NFC公司,对Apple向开发人员开放NFC有明显的既得利益。

--- Correction & Update ---

---更正和更新---

The hotel app actually uses Bluetooth, not NFC. NFC is still often used for door unlocking, just not in this one example. NFC could be used if the watch has an open NFC controller.

酒店应用程序实际上使用蓝牙,而不是NFC。 NFC仍然经常用于门解锁,而不是在这个例子中。如果手表具有开放的NFC控制器,则可以使用NFC。

I do know that Apple is aware of all of this and is discussing this with their top developers and stakeholders. There has already been massive negative push back on the lack of support for reading tags. As often the case in the past, I expect Apple to eventually open this up to developers for non-payment related functionality (reading tags, pairing). I do not think Apple will ever allow other wallets though. File sharing will likely be left to AirDrop as well.

我知道Apple已经意识到这一切,并正在与他们的顶级开发人员和利益相关者进行讨论。由于缺乏对阅读标签的支持,已经出现了大量的负面推动。正如过去的情况一样,我希望Apple最终能够向开发人员开放非支付相关功能(阅读标签,配对)。我认为Apple不会允许其他钱包。文件共享也可能留给AirDrop。

--- Update on March 23rd 2016 ---

--- 2016年3月23日更新---

I am continually asked for updates about this topic, often with people referencing this post. With Apple releasing the iPhone SE, many are again asking why Apple has not supported tag reading yet. In summary Apple is more focused on Apple Pay succeeding than the other use cases for NFC for now. Apple could make a lot of money from Apple Pay, and has less to make from the other uses for NFC. Apple will likely open up NFC tag reading when they feel that consumer trust and security with NFC and Apple Pay is such that it wont put Apple Pay at risk. Further information here.

我不断被要求提供有关此主题的更新,通常是人们引用此帖子。随着Apple发布iPhone SE,许多人再次问为什么Apple还没有支持标签阅读。总而言之,Apple目前比其他NFC用例更专注于Apple Pay。 Apple可以从Apple Pay赚到很多钱,并且从NFC的其他用途中赚得更少。当Apple认为消费者对NFC和Apple Pay的信任和安全性不会让Apple Pay面临风险时,它可能会开启NFC标签阅读。更多信息在这里。

--- Update on May 24th 2017 ---

--- 2017年5月24日更新---

A developer in Greece has hacked the iPhone 6s to get it to read NFC tags via the NFC private frameworks; more info & video. While this isn't a long term solution, it provides some guidance on some outstanding question: Is there enough power in the iPhone's NFC controller to power an NFC tag? Looks like the answer is yes. From initial testing the range is a few cm, which isn't too bad. It might also be the power is tunable; this is being investigated at this time. The implications of this are significant. If the older model phones do have enough RF power for tag reading/writing, then when Apple does open up the SDK it means there will be 100Ms of iPhones that can read NFC tags, vs the case where only the new iPhones could.

希腊的一名开发人员已经攻击iPhone 6s,让它通过NFC私有框架读取NFC标签;更多信息和视频。虽然这不是一个长期的解决方案,但它提供了一些突出问题的指导:iPhone的NFC控制器是否有足够的功率为NFC标签供电?看起来答案是肯定的。从最初的测试范围是几厘米,这不是太糟糕。它也可能是可调的功率;目前正在调查此事。这意味着重要的意义。如果老式手机确实有足够的射频功率用于标签读/写,那么当Apple打开SDK时,这意味着将有100M的iPhone可以读取NFC标签,而只有新的iPhone可以。

#3


5  

At the moment, there isn't any open access to the NFC controller. There are currently no NFC APIs in the iOS 8 GM SDK - which would indicate that the NFC capability will be restricted to Apple Pay at launch. This is our understanding.

目前,没有任何对NFC控制器的开放访问。目前iOS 8 GM SDK中没有NFC API - 这表明NFC功能在发布时仅限于Apple Pay。这是我们的理解。

Clearly, the NXP chip inside the iPhone 6 is likely to be able to do more so this doesn't mean that additional features (pairing, tag scanning/encoding) will not be added for release or in the near future.

显然,iPhone 6内部的恩智浦芯片可能会做得更多,因此这并不意味着不会在发布时或在不久的将来添加其他功能(配对,标签扫描/编码)。

#4


2  

At the moment, Apple has not opened any access to the embedded NFC chip to developers as suggested by many articles such as these ones :

目前,苹果尚未向开发者开放任何嵌入式NFC芯片,正如许多文章所建议的那样:

  • Apple Cripples NFC in iPhone 6, 6+ With Developer Ban from Daily Tech
  • 苹果公司在iPhone 6中使用NFC,在Daily Tech中使用开发人员禁用6+

  • Apple Restricting Use of NFC Antenna in iPhone 6 and 6 Plus to Apple Pay from Mac Rumors
  • Apple限制在iPhone 6和6 Plus中使用NFC天线,从Mac谣言中使用Apple Pay

  • Apple confirms iPhone 6 NFC chip is only for Apple Pay at launch from Cult of Mac
  • 苹果确认iPhone 6 NFC芯片仅适用于从Cult of Mac发售的Apple Pay

  • Apple initially restricts iPhone 6, iPhone 6 Plus NFC chip to Apple Pay from Tech Times
  • Apple最初将iPhone 6,iPhone 6 Plus NFC芯片限制为Tech Times的Apple Pay

The list goes on. The main reason seems (like lots the other hardware features added to the iPhone in the past) that Apple wants to ensure the security of such technology before releasing any API for developers to let them do whatever they want. So at first, they will use it internally for their needs only (such as Apple Pay at launch time).

名单还在继续。主要原因似乎(就像过去添加到iPhone中的其他硬件功能一样)Apple希望在为开发人员发布任何API之前确保此类技术的安全性,让他们做任何他们想做的事情。因此,首先,他们将仅在内部使用它来满足他们的需求(例如Apple Pay在发布时)。

"At the moment, there isn't any open access to the NFC controller," said RapidNFC, a provider of NFC tags. "There are currently no NFC APIs in the iOS 8 GM SDK".

“目前,NFC控制器没有任何开放访问权限,”NFC标签提供商RapidNFC表示。 “目前iOS 8 GM SDK中没有NFC API”。

But eventually, I think we can all agree that they will develop such API, it's only a matter of time.

但最终,我认为我们都同意他们会开发这样的API,这只是时间问题。

#5


2  

The ability to read an NFC tag has been added to iOS 11 which only support iPhone 7 and 7 plus

iOS 11中添加了读取NFC标签的功能,仅支持iPhone 7和7 plus

As a test drive I made this repo

作为试驾我做了这个回购

First: We need to initiate NFCNDEFReaderSession class

第一:我们需要启动NFCNDEFReaderSession类

var session: NFCNDEFReaderSession? session = NFCNDEFReaderSession(delegate: self, queue: nil, invalidateAfterFirstRead: false)

Then we need to start the session by:

然后我们需要通过以下方式开始会话:

session?.begin()

and when done:

完成后:

session?.invalidate()

The delegate (which self should implement) has basically two functions:

委托(自我应该实现)基本上有两个功能:

func readerSession(_ session: NFCNDEFReaderSession, didDetectNDEFs messages: [NFCNDEFMessage])func readerSession(_ session: NFCNDEFReaderSession, didInvalidateWithError error: Error)

here is my reference Apple docs

这是我的参考Apple文档

#6


1  

The only information currently available is that Apple Pay will be available in ios8, but that doesn't shed any light on whether RFID tags or rather NFC tags specifically will be able to be detected/read.

目前唯一可用的信息是Apple Pay将在ios8中提供,但这并不能说明RFID标签或NFC标签是否能够被检测/读取。

IMO it would be a shortsighted move not to allow that possibility, but really the money is in Apple Pay, not necessarily in allowing developers access to those features - we've seen it before with tethering, Bluetooth SPP, and diminished access to certain functions.

IMO这是一个短视的举动,不允许这种可能性,但实际上钱是Apple Pay,不一定是允许开发人员访问这些功能 - 我们之前已经看到它使用网络共享,蓝牙SPP和减少对某些功能的访问。

...but then again, it's been about 5 hours since the first announcement.

......但是又一次,自第一次宣布以来已经过了大约5个小时。

#7


-2  

I think it will be sometime before we get to see access to the NFC as the pure security side of it like for example being able to walk past somebody brush past them and & get your phone to the zap the card details or simply Wave your phone over someone's wallet which They left on the desk.

我认为,在我们看到NFC作为其纯粹的安全方面之前的某个时候,例如能够走过某人刷过它们并让你的手机消除卡片细节或简单地挥动你的手机在他们离开桌子的某人的钱包上。

I think the first step is for Apple to talk to banks and find more ways of securing cards and NFC before This will be allowed

我认为,第一步是让Apple与银行交谈并找到更多保护卡和NFC的方法,然后才允许这样做


推荐阅读
  • mysqldinitializeconsole失败_mysql03误删除了所有用户解决办法
    误删除了所有用户解决办法第一种方法(企业常用)1.将数据库down掉[rootdb03mysql]#etcinit.dmysqldstopShuttingdownMySQL..SU ... [详细]
  • Linux重启网络命令实例及关机和重启示例教程
    本文介绍了Linux系统中重启网络命令的实例,以及使用不同方式关机和重启系统的示例教程。包括使用图形界面和控制台访问系统的方法,以及使用shutdown命令进行系统关机和重启的句法和用法。 ... [详细]
  • 微软头条实习生分享深度学习自学指南
    本文介绍了一位微软头条实习生自学深度学习的经验分享,包括学习资源推荐、重要基础知识的学习要点等。作者强调了学好Python和数学基础的重要性,并提供了一些建议。 ... [详细]
  • Iamtryingtomakeaclassthatwillreadatextfileofnamesintoanarray,thenreturnthatarra ... [详细]
  • 向QTextEdit拖放文件的方法及实现步骤
    本文介绍了在使用QTextEdit时如何实现拖放文件的功能,包括相关的方法和实现步骤。通过重写dragEnterEvent和dropEvent函数,并结合QMimeData和QUrl等类,可以轻松实现向QTextEdit拖放文件的功能。详细的代码实现和说明可以参考本文提供的示例代码。 ... [详细]
  • android listview OnItemClickListener失效原因
    最近在做listview时发现OnItemClickListener失效的问题,经过查找发现是因为button的原因。不仅listitem中存在button会影响OnItemClickListener事件的失效,还会导致单击后listview每个item的背景改变,使得item中的所有有关焦点的事件都失效。本文给出了一个范例来说明这种情况,并提供了解决方法。 ... [详细]
  • baresip android编译、运行教程1语音通话
    本文介绍了如何在安卓平台上编译和运行baresip android,包括下载相关的sdk和ndk,修改ndk路径和输出目录,以及创建一个c++的安卓工程并将目录考到cpp下。详细步骤可参考给出的链接和文档。 ... [详细]
  • Webmin远程命令执行漏洞复现及防护方法
    本文介绍了Webmin远程命令执行漏洞CVE-2019-15107的漏洞详情和复现方法,同时提供了防护方法。漏洞存在于Webmin的找回密码页面中,攻击者无需权限即可注入命令并执行任意系统命令。文章还提供了相关参考链接和搭建靶场的步骤。此外,还指出了参考链接中的数据包不准确的问题,并解释了漏洞触发的条件。最后,给出了防护方法以避免受到该漏洞的攻击。 ... [详细]
  • 本文介绍了在MFC下利用C++和MFC的特性动态创建窗口的方法,包括继承现有的MFC类并加以改造、插入工具栏和状态栏对象的声明等。同时还提到了窗口销毁的处理方法。本文详细介绍了实现方法并给出了相关注意事项。 ... [详细]
  • Vagrant虚拟化工具的安装和使用教程
    本文介绍了Vagrant虚拟化工具的安装和使用教程。首先介绍了安装virtualBox和Vagrant的步骤。然后详细说明了Vagrant的安装和使用方法,包括如何检查安装是否成功。最后介绍了下载虚拟机镜像的步骤,以及Vagrant镜像网站的相关信息。 ... [详细]
  • 本文介绍了一个React Native新手在尝试将数据发布到服务器时遇到的问题,以及他的React Native代码和服务器端代码。他使用fetch方法将数据发送到服务器,但无法在服务器端读取/获取发布的数据。 ... [详细]
  • Postgresql备份和恢复的方法及命令行操作步骤
    本文介绍了使用Postgresql进行备份和恢复的方法及命令行操作步骤。通过使用pg_dump命令进行备份,pg_restore命令进行恢复,并设置-h localhost选项,可以完成数据的备份和恢复操作。此外,本文还提供了参考链接以获取更多详细信息。 ... [详细]
  • 本文介绍了贝叶斯垃圾邮件分类的机器学习代码,代码来源于https://www.cnblogs.com/huangyc/p/10327209.html,并对代码进行了简介。朴素贝叶斯分类器训练函数包括求p(Ci)和基于词汇表的p(w|Ci)。 ... [详细]
  • 本文概述了JNI的原理以及常用方法。JNI提供了一种Java字节码调用C/C++的解决方案,但引用类型不能直接在Native层使用,需要进行类型转化。多维数组(包括二维数组)都是引用类型,需要使用jobjectArray类型来存取其值。此外,由于Java支持函数重载,根据函数名无法找到对应的JNI函数,因此介绍了JNI函数签名信息的解决方案。 ... [详细]
  • Question该提问来源于开源项目:react-native-device-info/react-native-device-info ... [详细]
author-avatar
jystmj-2009
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有