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

<key>CTLicenseData</key>
<data>
PCFET0NU...GlzdD4=
</data>

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">
<dict>
	<key>Email</key>
	<string>jameshfisher@gmail.com</string>
	<key>Name</key>
	<string>James Fisher</string>
	<key>Order</key>
	<string>CON170111-1234-12345</string>
	<key>Product</key>
	<string>Contexts</string>
	<key>Timestamp</key>
	<string>Thu, 16 Jun 2016 14:54:38 +0000</string>
	<key>Version</key>
	<string>1</string>
	<key>Signature</key>
	<data>pEt2vSxtA/QZ0JLmC/BqGeZbZ1kfr+HCQ2oSb+mdbu4OpMNR150jf08nE=</data>
</dict>
</plist>

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:
https://sites.fastspring.com/contextsformac/order/dl/CON170111-1234-12345

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:
https://sites.fastspring.com/contextsformac/order/invoice/CON170111-1234-12345


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

Tagged .

Similar posts

More by Jim

Want to build a fantastic product using LLMs? I work at Granola where we're building the future IDE for knowledge work. Come and work with us! Read more or get in touch!

This page copyright James Fisher 2017. Content is not associated with my employer. Found an error? Edit this page.