Almond Joy
Almond Joy

Reputation: 119

NFC Background reading on iOS - universal link keeps opening in Safari

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

  1. encoded an NFC sticker with the URI https://example.com/sku

  2. added the string "applinks:example.com" to my entitlements for associated domains

  3. 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!

Upvotes: 1

Views: 1844

Answers (1)

Almond Joy
Almond Joy

Reputation: 119

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".

Upvotes: 4

Related Questions