What Can The Custom URL Do? Both Mac OS and iOS


#1

As I mentioned in http://www.autorefinancing.us/t/keyboard-maestro-remote-web-trigger-works-on-mac/56/1 you can get a Custom URL on Mac OS to drive Keyboard Maestro.

However if I enter a URL to, say, http://www.ibm.com it has no effect when the button is pushed. This is true on both Mac OS and iOS.

So, when I press a button that is defined a Custom, with a URL what is it supposed to do? Pop up a browser window?

Actually on iOS I wanted to use a URL of the form editorial:// to kick off the Editorial app. Nothing seems to happen here. So workflow:// would be nice for kicking off on-device automation.


#2

I’m not sure iOS is allowed to handle that. I don’t believe apps can launch other apps in the background.


#3

Actually they can and do all the time…

… I would look up x-callback-url and also note that apps like Launcher and LaunchCenter Pro do this. Heck, Workflow is almost entirely built on that capability.

It would be ironic if you had built code to only allow http and https - as that would be missing a great opportunity to launch apps, complete with parameters.


#4

Sure but not from the background, which is why it’s not so useful for the remote.


#5

OK. Thanks for clarifying that aspect.

So what is the purpose of Custom URLs - on Mac OS and iOS?


#6

There’s a number of advanced home IoT systems out there that people have setup that can take webhooks on the local network. I’m not 100% clear on which systems those are but people use them and requested a custom URL app, which is why I built it.


#7

Right. But is it sticking a URL in a browser (I think not) or doing a wget (I think so).

Doing a wget - where the side effect on the server is the thing, rather than the returned data - explains what I see…

  1. It explains why Keyboard Maestro “Remote URL” works.

  2. Given no background execution it explains why eg editorial:// does nothing on iOS (though that might be your code filtering it out).

I think I have a better understanding now of what it can and can’t do. Thanks!


#8

Hi! Hope you’re recovering from your injury well.

Can you tell me what happens if I invoke a custom URL? (My previous question) wget in effect?


#9

A custom URL simply makes a GET request to the URL. Right now you cannot add custom headers, but this should work well enough for now.