iOS URL scheme?

I used to use discourse://open on my iOS device to cause DiscourseHub to open, but it no longer works or even highlights as a link in a plaintext email like it used to.

Does this URL scheme no longer work? Is there something new I can try? I attempted discoursehub://open and that doesn’t seem to work either right now (1.8.2).

1 Like

a quick dip into the source code reveals:

Which appears to open the Hub on iOS

2 Likes

I guess it might be an issue with iOS Mail rather than the app itself. I have a system set to send me a list of links to check daily, and one of the things I want to do at least once a day is check the Discourse app. discourse://open in the plaintext email used to get highlighted as a link and open DiscourseHub when I tap it, but sometime fairly recently (not sure exactly when) the URL in the email stopped displaying as a link.

So it might be an iOS Mail thing, but I’m not sure how it knows that URL-ish strings to display as links in plaintext email. Is it because discourse:// needs to be registered by the app as a legitimate scheme? When I send an HTML message with a link to discourse://open I can tap it in iOS and get directed to the app, but not when that URL scheme is plaintext.

Yes, I see that a manually-written HTML link brings up the app with that URL. But iOS Mail no longer turns that URL in a plaintext email into a tappable link. Does the app need to register the URL scheme with the OS somehow? Has that changed?

1 Like

Yes, the DiscourseHub app registers that custom url scheme. Do you have DiscourseHub installed? If not, can you install and see if then those URLs are turned into links?

Yes, I’ve had it installed for a long time. I’m not sure what changed for the link to stop appearing, which happened fairly recently.

I just uninstalled & reinstalled the iOS app, and it’s still not creating a link in Mail.

Hmm… yeah, not sure I can help further, seems like an iOS/Mail issue. Maybe you can send a proper html link instead?

Is creating a mobile app for your community an option? If so you could add universal link support.

Unfortunately, that would involve a significant rework of my system that emails me lists of links. It’s just a jumble of bash, cron, and text files at this point.

I’m not that into it, and it’s technically not even my community. I was just hoping to get discourse://open to work again the way it used to, but it seems like that feature/functionality is gone now.

What is determining the link to be discourse://open? Is that under your control? Why can’t you change that to discourse://auth_redirect which now does the same thing?

FWIW, there haven’t been any changes to the app in this regard recently, so this is likely an issue with your device, Mail, iOS and so on.

Still doesn’t work.

image

What is that a screenshot of? That simply tells me whatever is displaying that link no longer recognises that as a clickable uri.

If you put discourse://auth_redirect into the safari address bar, on the other hand, it does work.

So @pmusaraj is on the right track here I think, it’s an issue with the way that uri is being presented as unclickable text.

Can you encode an anchor there?

It’s just iOS Mail displaying a plaintext email. Until recently, discourse://open used to be a tappable link on par with http/https strings. That’s exactly what I’ve been meaning to communicate throughout this thread, however clumsily. I have no idea what changed.

My system as currently designed just concatenates plaintext files and send them through mailx, so HTML isn’t interpolated.

Forget the anchor idea

discourse://open still works via safari address bar, and works for me in iOS Mail too (iOS 15.5). It doesn’t work for me in Yahoo Mail.

I’m not sure if it matters too much what string comes after :// btw, it is enough to use just discourse://. I would look at the source code to decide what strings you can’t safely use to open the Hub.

Understood. I just used open because it worked. Until, of course, it didn’t, but I don’t know what exactly changed.

discourse:// didn’t render as a link in iOS mail, either, unfortunately. Again, I have no idea what changed and in what application to cause this rendering to stop, or even how to test that.