MacOS – Is it possible to create a paid application which makes use of an Automator service

applescriptautomatormacmac-appstoremacos

The functionality of my application is as follows:

  • Get highlighted text from any application in macOS.
  • Do some processing on it, including interaction with a server.
  • Show output as a dialog on macOS.

I know that we can read the highlighted text from any application if we use a Mac Automator service. This pretty much works for me with only one caveat. The Automator service can be read and modified by anyone. I would like to distribute this as a paid application. Hence, I would prefer that my application not be modified or even read by anyone.
Is it possible to do so?
I'm fine with using something other than an Automator if the functionality written above is satisfied.

Best Answer

Yes, it is definitely possible.

I don't think the logic that it is necessary that a paid application is opaque and static is true. It is entirely possible to sell software while providing access to the source code and letting the customer modify it. Software has been sold that way by large and small companies for decades.

If you really want a technical solution, you can use obfuscation to hide the plain text of scripting languages such as AppleScript. Some languages have an eval-like functionality enabling you to deobfuscate source code and run it directly, whereas for AppleScript you probably want to store it in a seperate object file and run it - or employ OSAKit to be able to run the source directly.

Most programmers in closed-souce, commercial software would probably not employ such "tricks", but rather go for a compilable language such as Swift, Objective-C, C++ or similar to get an executeable that is not immediately "readable" by humans.

Note that all software that can be run can also be reverse-engineered.