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.
com.contextsformac.Contexts.plist file has a section like this (after conversion to XML):
<key>CTLicenseData</key> <data> PCFET0NU...GlzdD4= </data>
<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>email@example.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: firstname.lastname@example.org From: Contexts App <email@example.com> Reply-To: firstname.lastname@example.org To: James Fisher <email@example.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 firstname.lastname@example.org. Tweet us at https://twitter.com/contextsapp.
So Contexts is using FastSpring for its licenses.
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.
I wrote this because I want to charge for Vidrio. This post is not associated with my employer.