x-apple-data-detectors

From IndieWeb


x-apple-data-detectors is a URL scheme seen in an error message after clicking on auto-linked text in an Apple Notes app text note, that was errantly copied as a link from one note to a shared note, which when clicked in MacOS does not resolve due to a proprietary scheme and path ID dependent on source context; avoid such anti-patterns in auto-link functions.

Error

Example error message:

There is no application set to open the URL x-apple-data-detectors://embedded-result/nnn

where "nnn" is a 3 digit number that clearly is an index into a device-local database and is thus useless in another context such as another device.

Anti-patterns

Anti-patterns from such Apple auto-linking:

  • overly aggressively β€œdata detector” (regex, algorithm, LLM, whatever) text matching β€” auto-linking should have zero false positives, better to have false-negatives (some things not getting auto-linked) than any false-positives
  • mixing code generated content and author content: copying an auto-link URL as if it was part of the source content and then pasting it, instead of preserving author-created text only, and instead designing for lazy auto-linking at the destination
  • proprietary URL scheme (even β€œx-” at that)
  • URL segment dependent on device-only info: path identifier segment dependent on a device-local database row, unresolvable when such content is shared in another context, e.g. via a shared note, or if copy/pasted into a message

See Also