How to open Reddit links on macOS in Apollo app
- modified:
- reading: 4 minutes
Apollo is a great alternative Reddit application for iOS. And Developers allow us to install it on macOS. Sometimes I find it way better to browse Reddit using Apollo on macOS, than to use a browser.
If you are like me, use Email for most of the notifications and communications, you might have subscribed for all the notifications from Reddit to go to your email.
I have decided to play with OpenIn and figure out, how I can open Reddit links from emails right in the Apollo app.
Just a note, you need to be using OpenIn version 3.0.3 or above, which is available on App Store and SetApp.
If you look at the raw links from the email addresses, they look like that
https://click.redditmail.com/CL0/
https:%2F%2Fwww.reddit.com%2Fr%2Fmacapps%2Fcomments%2Fr7b4yx%2F
openin_v3_is_out_and_40_off_for_a_week%2Fhn0mt18%2F%3F$deep_link=true
%26correlation_id=b7cc0b2d-66db-4dd2-a101-e7786868ca5a%26ref=email_post_reply
%26ref_campaign=email_post_reply%26ref_source=email/3/
0100017d7e24c980-e9b0c92a-e98d-498e-aff6-8eb446620001-000000/
yGlIL0u28XMdjddv_6Wog4QoLjyPFmb5Fg3rNkpmOrs=226
The interesting part hides behind the path, after /CL0/
you can clearly see the URL of what we are trying to visit.
And if you try to URL-decode it, that what you get
https://www.reddit.com/r/macapps/comments/r7b4yx/openin_v3_is_out_and_40_off_for_a_week/
hn0mt18/?$deep_link=true&correlation_id=b7cc0b2d-66db-4dd2-a101-e7786868ca5a&
ref=email_post_reply&ref_campaign=email_post_reply&ref_source=email/3/
0100017d7e24c980-e9b0c92a-e98d-498e-aff6-8eb446620001-000000/
yGlIL0u28XMdjddv_6Wog4QoLjyPFmb5Fg3rNkpmOrs=226
And turns out to send this link
to Apollo you just need to convert the scheme https
to apollo
.
Let’s play with OpenIn to figure out how we can send those links from Emails directly to Apollo.
Step 1. Make sure Apollo is installed on Mac
First thing, we need to go to the App Store, search for Apollo and switch to iPhone & iPad Apps, and install it.
Step 2. Add Apollo as a browser app in OpenIn
Open OpenIn Preferences dialog. Select Links->Browsers, and add Apollo app as a browser. You will see that Apollo does not support https scheme, so we will enable “Rewrite URL” rule, and use the example to change the protocol to apollo.
url.protocol = "apollo"
And to test it, we will try the URL https://ww.reddit.com/r/apolloapp
, which will result in apollo://ww.reddit.com/r/apolloapp
.
After that, all the links that we send to Apollo will be modified, by replacing the scheme from https
to apollo
.
Step 3. Configure a rule
On the next step we will go to the Rules and add a new rule, that will activate only for domains *.reddit.com
and
*.redditmail.com
. The first one is just in case, if we will have a Reddit link clicked anywhere, and second one for the
links that we receive in emails.
In my rule I want to see selection of Apollo app and Safari browser, if I need to open this link in Safari.
And I will use JavaScript to change the URL from the redditmail.com
to reddit.com
only for links that have domain
redditmail.com
, as reddit.com
links we can send directly to Apollo.
if (ctx.url.hostname.endsWith('redditmail.com')) {
ctx.url.href = decodeURIComponent(ctx.url.pathname.split("/", 3)[2])
}
Step 4. Let’s test it!
We will try both links, that we have received in email with domain redditmail.com
and that we can get anywhere else
(like Slack or Twitter) with domain reddit.com
, and we will try to Open them directly in Apollo and in Safari as well.
The App Selection dialog is the one provided by OpenIn.
Summary
OpenIn 3 provides you a great tool for rewriting URLs and saving times by opening links and files in the applications
that you want instead of going through the browser. There are a lot of native app exists, that can open those links
from email directly in the apps with the help of OpenIn. You just need to know format of those links. Most of the time
you can just change the protocol from the https
to the one supported by the app. And OpenIn pre-populate the list of
examples with the URLs that we know that app supports.
A few examples: Music, Notion, ClickUp and more. OpenIn also have built-in support for Zoom meeting links.
OpenIn is available from our website as 14 days trial, it is on discount at App Store (40% off until December 10th), and available through the subscription of SetApp.