Unexpected behavior encountered when scanning NFC tags.
Imagine a link shortener web service where users can create lots of different URLs that are hosted on the same domain eg, https://short.com/unique-path
The service has optional App Clip capability -- users can select any of their links and have the service create an App Clip for the selected link(s).
Users can encode their URLs into NFC tags and have their customers scan NFC tags.
Let's take just two URLs for example:
- https://short.com/foo
- https://short.com/bar
The /foo link does have an App Clip associated with it while /bar does not have it. Each link has been encoded into appropriate NFC tag.
Expected behavior when scanning from an iPhone:
- /foo -- shows an App Clip popup.
- /bar -- shows a "Open in Safari" default notification.
What's actually happening
- /foo -- opens App Clip poput with correct metadata (title, subtitle, image) which is totally expected behavior.
- /bar (the one that doesn't have app clip associated with it) -- opens an App-Clip-like popup with the following error: CPSErrorDomainError 2 (see attachment below)
So for some reason when someone scans an NFC tag with a URL that is not an App Clip and never has been -- it always shows that error regardless whether the URL exists or does not exist. I've tried few different/random URLs (which don't have an App Clip associated with it) and all of them show the same error.
Additional details:
- All links use the same domain and URL format: domain.com/path where path is a short string of random a-Z characters.
- All App Clips are created at the same iOS app.
- AASA is good: Cache and Debug -- both green.
- This issue has happened to lots of users on lots of different iPhones and iOS'.
Since the issue's been happening to lots of different users on different iPhone(s)/iOS' no sysdiagnose is attached. Actually it works the same on every device/iOS we've tried.
Before submitting the issue, I've found few other developers reporting the same issue.
What's interesting though is none of the links I've went through comes with a definite answer and it seems like this issue just randomly comes and goes without any specific changes on the server and/or iOS app.
Dropping the links of similar issues below.
- https://developer.apple.com/forums/thread/671433
- https://developer.apple.com/forums/thread/665969
- https://developer.apple.com/forums/thread/775316
- https://developer.apple.com/forums/thread/764545