iOS 上的 NFC 背景阅读 - 通用链接在 Safari 中不断打开 [英] NFC Background reading on iOS - universal link keeps opening in Safari
问题描述
我正在处理一个奇怪的问题,我在 iOS 上成功设置了通用链接,我可以从手机点击我的域并直接转到应用程序.
但是,我想设置NFC后台阅读,一直在关注这个教程:https://medium.com/appcoda-tutorials/building-nfc-product-scanner-ios-app-with-corenfc-alfian-losari-5da0365bcde5
根据教程,我已经
使用 URI https://example.com/sku 对 NFC 贴纸进行编码>
将字符串applinks:example.com"添加到我对关联域的权利
- 设置通用链接并验证点击https://example.com/sku"来自,比如说,iMessage 将我带到我的应用程序
但是,当我阅读 NFC 标签时,我始终收到网站 NFC 标签通知,将我带入 Safari.任何人都可以帮我调试为什么会这样吗?
谢谢!
作为堆栈溢出的传统,我想在这里记录我的白痴给后人:
子域也需要包含在应用链接中:仔细检查后,我发现 NFC 贴纸是用www.example.com"编码的.
I'm dealing with a strange issue where I've successfully set up Universal Link on iOS, and I can click on my domain from my phone and get taken straight to the app.
However, I want to set up NFC background reading, and have been following this tutorial: https://medium.com/appcoda-tutorials/building-nfc-product-scanner-ios-app-with-corenfc-alfian-losari-5da0365bcde5
Per the tutorial, I've
encoded an NFC sticker with the URI https://example.com/sku
added the string "applinks:example.com" to my entitlements for associated domains
- set up universal links and verified that clicking "https://example.com/sku" from, say, iMessage takes me to my app
However, when I read the NFC sticker, I consistently get a Website NFC Tag notification that takes me into Safari. Can anyone please help me debug why this might be the case?
Thanks!
As is stack overflow tradition, I would like to record my idiocy here for posterity:
The subdomain also needs to be included in the applink: on closer inspection, I realized the NFC stickers were encoded with "www.example.com".
这篇关于iOS 上的 NFC 背景阅读 - 通用链接在 Safari 中不断打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!