# iOS URL scheme?

**URL:** https://meta.discourse.org/t/ios-url-scheme/227102
**Category:** Support
**Created:** [May 15, 2022, 9:16pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102 "2022-05-15T21:16:00Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![augmentedfourth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/augmentedfourth/32/260355_2.png) [@augmentedfourth](https://meta.discourse.org/u/augmentedfourth)
#### Post date: [May 15, 2022, 9:16pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/1 "2022-05-15T21:16:00Z")

</div>

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).

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 16, 2022, 7:09am UTC](https://meta.discourse.org/t/ios-url-scheme/227102/2 "2022-05-16T07:09:05Z")

</div>

a quick dip into the source code reveals:

> <https://github.com/discourse/DiscourseMobile/blob/fe77eff02075862020cdb13ab9c537ffb909a9d6/js/site_manager.js#L24>

Which appears to open the Hub on iOS

---

<div class="post-metadata">

### Author: ![augmentedfourth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/augmentedfourth/32/260355_2.png) [@augmentedfourth](https://meta.discourse.org/u/augmentedfourth)
#### Post date: [May 16, 2022, 5:34pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/3 "2022-05-16T17:34:52Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![augmentedfourth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/augmentedfourth/32/260355_2.png) [@augmentedfourth](https://meta.discourse.org/u/augmentedfourth)
#### Post date: [May 18, 2022, 2:12pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/4 "2022-05-18T14:12:06Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [May 18, 2022, 2:14pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/5 "2022-05-18T14:14:45Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![augmentedfourth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/augmentedfourth/32/260355_2.png) [@augmentedfourth](https://meta.discourse.org/u/augmentedfourth)
#### Post date: [May 18, 2022, 2:16pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/6 "2022-05-18T14:16:20Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![augmentedfourth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/augmentedfourth/32/260355_2.png) [@augmentedfourth](https://meta.discourse.org/u/augmentedfourth)
#### Post date: [May 18, 2022, 2:22pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/7 "2022-05-18T14:22:50Z")

</div>

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

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [May 18, 2022, 2:28pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/8 "2022-05-18T14:28:11Z")

</div>

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

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 18, 2022, 2:38pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/9 "2022-05-18T14:38:41Z")

</div>

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

---

<div class="post-metadata">

### Author: ![augmentedfourth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/augmentedfourth/32/260355_2.png) [@augmentedfourth](https://meta.discourse.org/u/augmentedfourth)
#### Post date: [May 18, 2022, 4:53pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/10 "2022-05-18T16:53:01Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![augmentedfourth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/augmentedfourth/32/260355_2.png) [@augmentedfourth](https://meta.discourse.org/u/augmentedfourth)
#### Post date: [May 18, 2022, 4:53pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/11 "2022-05-18T16:53:59Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 18, 2022, 4:57pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/12 "2022-05-18T16:57:33Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [May 18, 2022, 5:00pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/13 "2022-05-18T17:00:36Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![augmentedfourth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/augmentedfourth/32/260355_2.png) [@augmentedfourth](https://meta.discourse.org/u/augmentedfourth)
#### Post date: [May 18, 2022, 5:01pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/14 "2022-05-18T17:01:23Z")

</div>

Still doesn’t work.

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/7/3/7738ca81e96e3d1b9c6abf259bd3d929e3df084b.jpeg)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 18, 2022, 5:07pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/15 "2022-05-18T17:07:50Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![augmentedfourth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/augmentedfourth/32/260355_2.png) [@augmentedfourth](https://meta.discourse.org/u/augmentedfourth)
#### Post date: [May 18, 2022, 5:19pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/16 "2022-05-18T17:19:26Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![augmentedfourth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/augmentedfourth/32/260355_2.png) [@augmentedfourth](https://meta.discourse.org/u/augmentedfourth)
#### Post date: [May 18, 2022, 5:25pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/17 "2022-05-18T17:25:20Z")

</div>

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

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/a/d/aada7b909345659a8638c571a855dfe1997e58e8.jpeg)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 18, 2022, 5:31pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/18 "2022-05-18T17:31:44Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![augmentedfourth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/augmentedfourth/32/260355_2.png) [@augmentedfourth](https://meta.discourse.org/u/augmentedfourth)
#### Post date: [May 18, 2022, 5:43pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/19 "2022-05-18T17:43:27Z")

</div>

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

---

<div class="post-metadata">

### Author: ![augmentedfourth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/augmentedfourth/32/260355_2.png) [@augmentedfourth](https://meta.discourse.org/u/augmentedfourth)
#### Post date: [May 22, 2022, 8:48pm UTC](https://meta.discourse.org/t/ios-url-scheme/227102/20 "2022-05-22T20:48:58Z")

</div>

`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.
