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
What does the dot do in JavaScript?
foo.bar
, foo.bar()
, or foo.bar = baz
- what do they mean? A deep dive into prototypical inheritance and getters/setters. 2020-11-01
Smear phishing: a new Android vulnerability
Trick Android to display an SMS as coming from any contact. Convincing phishing vuln, but still unpatched. 2020-08-06
A probabilistic pub quiz for nerds
A “true or false” quiz where you respond with your confidence level, and the optimal strategy is to report your true belief. 2020-04-26
Time is running out to catch COVID-19
Simulation shows it’s rational to deliberately infect yourself with COVID-19 early on to get treatment, but after healthcare capacity is exceeded, it’s better to avoid infection. Includes interactive parameters and visualizations. 2020-03-14
The inception bar: a new phishing method
A new phishing technique that displays a fake URL bar in Chrome for mobile. A key innovation is the “scroll jail” that traps the user in a fake browser. 2019-04-27
The hacker hype cycle
I got started with simple web development, but because enamored with increasingly esoteric programming concepts, leading to a “trough of hipster technologies” before returning to more productive work. 2019-03-23
Project C-43: the lost origins of asymmetric crypto
Bob invents asymmetric cryptography by playing loud white noise to obscure Alice’s message, which he can cancel out but an eavesdropper cannot. This idea, published in 1944 by Walter Koenig Jr., is the forgotten origin of asymmetric crypto. 2019-02-16
How Hacker News stays interesting
Hacker News buried my post on conspiracy theories in my family due to overheated discussion, not censorship. Moderation keeps the site focused on interesting technical content. 2019-01-26
My parents are Flat-Earthers
For decades, my parents have been working up to Flat-Earther beliefs. From Egyptology to Jehovah’s Witnesses to theories that human built the Moon billions of years in the future. Surprisingly, it doesn’t affect their successful lives very much. For me, it’s a fun family pastime. 2019-01-20
The dots do matter: how to scam a Gmail user
Gmail’s “dots don’t matter” feature lets scammers create an account on, say, Netflix, with your email address but different dots. Results in convincing phishing emails. 2018-04-07
The sorry state of OpenSSL usability
OpenSSL’s inadequate documentation, confusing key formats, and deprecated interfaces make it difficult to use, despite its importance. 2017-12-02
I hate telephones
I hate telephones. Some rational reasons: lack of authentication, no spam filtering, forced synchronous communication. But also just a visceral fear. 2017-11-08
The Three Ts of Time, Thought and Typing: measuring cost on the web
Businesses often tout “free” services, but the real costs come in terms of time, thought, and typing required from users. Reducing these “Three Ts” is key to improving sign-up flows and increasing conversions. 2017-10-26
Granddad died today
Granddad died. The unspoken practice of death-by-dehydration in the NHS. The Liverpool Care Pathway. Assisted dying in the UK. The importance of planning in end-of-life care. 2017-05-19
How do I call a program in C, setting up standard pipes?
A C function to create a new process, set up its standard input/output/error pipes, and return a struct containing the process ID and pipe file descriptors. 2017-02-17
Your syntax highlighter is wrong
Syntax highlighters make value judgments about code. Most highlighters judge that comments are cruft, and try to hide them. Most diff viewers judge that code deletions are bad. 2014-05-11
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.