PDA

View Full Version : Software Licensing




JOD8FY
Feb 28, 2007, 02:47 PM
Hello all,

I'm new to Objective C, but I wanted to create a small Cocoa application in Xcode. I have a little experience using Java and with a few online resources, I was able to gain enough programming knowledge to build a simple application. My question is that if I ever got good enough to create a program worthy of being sold, I would want to create licensing keys for the program. Essentially what I want to create is a license key system like the one that RapidWeaver uses. Is this difficult? How is it done? Is it simple enough to explain here or would I need to seek another resource somewhere else?

Thanks in advance,
JOD8FY



HungrySeacow
Feb 28, 2007, 03:49 PM
This is something that I was worried about too, but I found a wonderful solution. Aquatic Prime (http://aquaticmac.com/), by Lucas Newman. I use it for YummySoup! (http://hungryseacow.com/). Aquatic Prime provides everything for complete automation. Users purchase YummySoup! from a PayPal shopping cart, and get redirected to a script (on my horrible godaddy hosting account) that generates a license file and then emails it to the user. All the users have to do is double-click the file to open it with YummySoup! to complete the registration.

JOD8FY
Feb 28, 2007, 08:48 PM
That looks fantastic! I'll have to give it a try. One more question: How did you implement a 15 day trial into your program? Was it something you wrote into the software code? Nice app by the way.

Thanks a lot!
JOD8FY

HungrySeacow
Feb 28, 2007, 11:02 PM
That looks fantastic! I'll have to give it a try. One more question: How did you implement a 15 day trial into your program? Was it something you wrote into the software code? Nice app by the way.

Thanks a lot!
JOD8FY

Thanks! :)

The 15 day trial was easy too. When the program first launches it takes the date and enters it into the preference file. Every time YummySoup! is launched it checks that date to see how much time is left. Now, of course it isn't that simple. There are lots of things going on in the background to make sure that the 15 day trial isn't cheated.

But unlike some other developers, YummySoup! doesn't create hidden files anywhere on the system. If a user deletes the preference file, and the application support folder for YummySoup!, then the app is completely removed. This also means that after such, a user can start with another 15 day trial, but they would have to start with the stock recipe collection again.

caveman_uk
Mar 1, 2007, 02:34 AM
If you're using any registration scheme (especially one that uses objective-c) I'd include a few sanity checks to make sure invalid serials always get rejected. There's a number of ways to intercept the message calls to the validation routine.

semaja2
Mar 1, 2007, 05:08 AM
What do you do about the actually registration file?

Do you copy it somewhere or how do you keep the program registered, i would assume you dont make them keep opening the file and my only assumptions so far is you copy the license file somewhere or save the key data into the preferences.

caveman_uk
Mar 1, 2007, 06:18 AM
You could do either.

HungrySeacow
Mar 1, 2007, 01:47 PM
What do you do about the actually registration file?

Do you copy it somewhere or how do you keep the program registered, i would assume you dont make them keep opening the file and my only assumptions so far is you copy the license file somewhere or save the key data into the preferences.

YummySoup! copies the license file to the YummySoup! folder in Application Support. It then adds the path to the file in the preferences file. From there, various points in the program access the file to insure that the program is registered.

savar
Mar 1, 2007, 03:02 PM
There used to be a tutorial here (http://cocoadevcentral.com/articles/cat_tutorials_bare_basics.php) but it doesn't seem to be working right now.

Anyway, in theory its pretty simple. You define some piece of information that you want to track about a user (e.g. name) and then you hash all that information together. (You'd need to write your own hash function, though.)

To do it really well definitely requires some thought and some knowledge about information security. If this is more detail then you want to get into, then go with one of the prepackaged solutions. Otherwise, this is a fun project that you can reuse many times with other applications.

JOD8FY
Mar 1, 2007, 03:46 PM
Thanks for the replies, everyone.

Since I'm not that advanced with Objective C, it seems like Aquatic Prime may be my best bet. One question I have about it though is if a user uses the license key to unlock the program, can that key ever be used again? I guess essentially what I'm asking is can the user install the app onto another computer and use the same key to unlock it on both machines?

Thanks for all the help,
JOD8FY