ntfy icon indicating copy to clipboard operation
ntfy copied to clipboard

iOS: Make links clickable

Open binwiederhier opened this issue 2 years ago • 2 comments

binwiederhier avatar May 29 '22 20:05 binwiederhier

I investigated this for half an hour or so, and while it is pretty simple to just evaluate the entire payload as Markdown, I don't want to do that, because that would be inconsistent with the Android app. Also, I want links to be highlighted regardless of whether someone adds [..](..) around it or not.

This seems trickier, and I gave up after 30min.

Some links:

https://stackoverflow.com/questions/57744392/how-to-make-hyperlinks-in-swiftui

https://www.hackingwithswift.com/example-code/system/how-to-make-tappable-links-in-nsattributedstring

https://swiftuirecipes.com/blog/hyperlinks-in-swiftui-text

https://www.raywenderlich.com/29501177-attributedstring-tutorial-for-swift-getting-started

binwiederhier avatar Jun 07 '22 23:06 binwiederhier

Even just making notification text selectable/copiable would be a good start. At least you could then paste into the browser.

robfox92 avatar Jul 11 '22 03:07 robfox92

Hello, can confirm links are not clickable on my iPhone 12 Pro Max, iOS 14.4.1. Would be a really nice feature to have. Thanks.

plia7 avatar Jun 24 '23 15:06 plia7

I created a PR for this issue: https://github.com/binwiederhier/ntfy-ios/pull/14. @binwiederhier Can you check it?

loc9493 avatar Aug 16 '23 14:08 loc9493