The Registration User Interface

Saturday, May 17, 2008

Now that I know what I want my registration numbers to look like, I want to design the application’s user interface for the registration process.

Like most shareware applications, I want to offer a full working version of the program when it’s first downloaded. This will give users a chance to play with all of the features to determine if they want to purchase the program. Of course, if the program remains fully functional then there’s little incentive for them to purchase it, so after some number of days I want the program to either stop working, or run with some reduced functionality.



The Demo Window

When my application launches, I want to inform the user that there’s a trial period involved, and warn them about how many days remain in the trial. From this screen they should be able to go to the purchase page on my website, enter a registration code if they’ve purchased a license, or just dismiss the dialog and use the program.

So I whipped up this dialog in Interface Builder:

Since I want this to be a generic solution that I can easily use in multiple projects, everything here is generic and will be set at runtime to application specific values. For example, the icon will be replaced with the application’s icon, the CFBundleName and CFBundleVersion text fields will actually display the application’s name and version number from the application’s info.plist file. And the “xx” in the text will be replaced with the number of trial days allowed and remaining.



The Hidden File

To keep track of the number of trial days remaining, I’ll need to store the trial start date somewhere. I could do this quite easily in the user’s preferences file. But if the user wants to restart the trial period, the first thing they’re probably going to do is to look in the application’s preferences file to see if that’s where the trial start date is stored. If it is, they could edit the date or just toss out the preferences.

To make resetting the start date just slightly more difficult, I’ve decided to store it in a separate hidden plist file on the system. I can hide it either by actually making the file invisible, or by just giving it a deceptive file name that will blend in with other system file names. Or I can do both. Now the user has to find this hidden file to restart the trial period.

I could get really fancy and store the start date in both the user’s preferences file and a hidden file, or in multiple hidden files on the system, then compare the two to make sure they match. Most users wouldn’t be able to figure out that they need to delete both files simultaneously to restart the demo. But as I stated earlier, I’m really just trying to keep the honest people honest. So I’m going for simplicity instead.



The Registration Dialog

Back to the dialog, if the Register button is clicked I’ll need another dialog where the user’s name and registration code can be entered:

When this information is entered, I’ll run it through my validation routine to make sure the registration code is valid for the user name. If it is, then I need to store the user name and registration code so I can automatically verify it again the next time the program is launched. Once again, I could store these values in the user preferences file. Browsing through the preference files on my system, it’s obvious that many applications do this. But since I’ve already created another file for the trial start date, I might as well use that same hidden file. This will allow the user to throw out the preferences file without unregistering the program, and prevent other users on the machine from snagging a copy of the registration information if they happen to notice it in the application’s preferences file.



The Software License Window

There’s one last thing I wan to handle while I’m here. I want to display the application’s software license the first time the program is launched.

The user will need to click the Accept button to use the software. If they instead click Decline, the program will just quit. But if they click Accept, I want to store a Boolean value so I know I don’t need to display the license agreement the next time the program launches. Again, the hidden file is a good place to do this.

Comments

Just a small suggestion; your registration window should have its main button entitled "Register" rather than "OK" - much more Mac-like.

Posted by Mike Abdullah on May 18, 2008 2:50 AM


@Mike: Good suggestion. I'll make that change. Thanks!

Posted by Dave Batton on May 20, 2008 10:44 AM


Hi Dave,

I love this series of your posts and hope that this registration stuff will work out for you.

I have been thinking exactly about this stuff, yet I have a bit of a different approach to the verification of the number. I'm not sure if that would be a great idea - but ill just ask you about your thoughts in any case.

While the registration number gets checked against the key and stuff inside the application, I also (or alternativley) thought about checking for the license in an online stored database/file. That could stop people finding the key directly - but I suppose they could find the database information or online file with the key ... You think thats worth a thought?

Kind Regards,

Max

Posted by Max Karreth on June 28, 2008 1:35 PM


@Max: Trust me, the crackers will be able to generate a phony serial number for your application anyway. Or they'll be able to create a simple patch or distribute a pre-patched version of your application. The most you'll really do with online verification is annoy your real customers.

Posted by Dave Batton on July 2, 2008 7:48 AM


@Daves response: Your right. I think ill follow what you said in one of your other posts. It shouldn't be a waste of time. The registration codes are just there to keep honest users honest. :-D

Posted by Max Karreth on July 9, 2008 2:09 AM


Hey Dave.

Great post! This has really helped me out, however I have one question for you. Where did you find the template for the software license agreement?

Posted by Brad Goss on November 24, 2008 3:13 PM


Add a Comment
Please fill in the fields below to add a comment:
Name*:
Email Address*:
URL:
Spam Protection*:     Type "minneapolis" without the quotes.
Message*:
  Your email will not be published and the URL provided will be used as
a link on your name.

* indicates a required field.