Learn more about Russian war crimes in Ukraine.

How to implement a ‘free trial’ for macOS apps

A simple way to charge for macOS apps is to add an up-front cost in the Mac App Store. But I don’t want this for Vidrio. I think “free trial” or “freemium” models will be much more successful. The Mac App Store payment system also only works for a single platform, whereas I want Vidrio to be available on multiple platforms (e.g. Windows). Yet another reason is that I want to be able to experiment with policies such as subscription, and discounts for sharing.

Here’s a study of Contexts implements this. The user purchases a license key, enters it in-app, and then continues using the software. For this to work, the app needs a license-generation system on a server and a license-verification system in the app.

macOS apps store config data under ~/Library/Preferences/com.someapp.plist. Property-list files can be in multiple formats: XML, binary, or JSON. All of the config property-list files seem to be in binary format. We can convert them to the XML format using plutil -convert xml1 com.someapp.plist. You should copy the file first, because this tool overwrites the input file.

The com.contextsformac.Contexts.plist file has a section like this (after conversion to XML):


The <data> section is base64-encoded, and when decoded looks like:

<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<string>James Fisher</string>
	<string>Thu, 16 Jun 2016 14:54:38 +0000</string>

This data originates from a file I received in an email:

Delivered-To: jameshfisher@gmail.com
From: Contexts App <mailer@fastspring.com>
Reply-To: hello@contexts.co
To: James Fisher <jameshfisher@gmail.com>
Subject: Your Contexts License
Content-Type: text/plain; charset=UTF-8

Hi James Fisher,

Thanks for buying a license for Contexts!

Here is your license file:

You just have to download and click it open.

Charges will appear on your bill as: FS* fsprg.com

You can view your receipt here:

- Contexts App Team

We would love to hear your suggestions and feedback!

Write to us at hello@contexts.co.
Tweet us at https://twitter.com/contextsapp.

So Contexts is using FastSpring for its licenses.

I believe Contexts is using AquaticPrime to generate these asymmetrically signed license files. These are probably generated by FastSpring, which has an AquaticPrime integration; FastSpring says

Our platform also supports several license key code generation products including AquaticPrime, ByteShield, CocoaFOB, GameShield, Quick License Manager (QLM), SoftwareKey System, CryptoLicensing, and SoftwareShield.

AquaticPrime seems old and semi-dead. Which things in that list are well-supported in 2017? The top ones in that list seem to be SoftwareKey, CryptoLicensing, and GameShield. In a nutshell, they all look shite.

What can computers do? What are the limits of mathematics? And just how busy can a busy beaver be? This year, I’m writing Busy Beavers, a unique interactive book on computability theory. You and I will take a practical and modern approach to answering these questions — or at least learning why some questions are unanswerable!

It’s only $19, and you can get 50% off if you find the discount code ... Not quite. Hackers use the console!

After months of secret toil, I and Andrew Carr released Everyday Data Science, a unique interactive online course! You’ll make the perfect glass of lemonade using Thompson sampling. You’ll lose weight with differential equations. And you might just qualify for the Olympics with a bit of statistics!

It’s $29, but you can get 50% off if you find the discount code ... Not quite. Hackers use the console!

More by Jim

Tagged . All content copyright James Fisher 2017. This post is not associated with my employer. Found an error? Edit this page.