I'm not sure what the issue is with Sketch's built-in sketch:// protocol links.
Basic stuff works ok, but the centerOnLayer function doesn't seem to work properly.
So, I whipped up this plugin as a work-around. Choose Plugins >> Deep Link >> Get URL to copy a plugin link to your clipboard. It'll embed the document id, page id, and target layer name as query parameters. Should work regardless of whether the document is already open and active or not.
The code makes some very rough assumptions:
- documents are saved in the workspace "cloud" (didn't test with local docs)
- Layer names don't have slashes or characters that would break the parsing code.
- If sketch changes the path recipe, this will likely break.
Bug reports and pull requests are encouraged, but no warranty, you get what you pay for, YMMV, etc