views:

317

answers:

3

Hi Everyone:

I am looking at using AquaticPrime for my key generator for a Cocoa shareware app. For those of you who don't know about it, you can check it out here: http://aquaticmac.com/. However, I am running into a problem when I attempt to implement it. I don't want my users to have to copy and paste a whole dictionary into my app (or select it from a file browser), I just want them to have some code like: 1111-1111-1111-1111-1111 that will unlock the app for them. Is there some way to do this in AquaticPrime? But assuming that it can't, is there some other framework that does do this or would I just have to hard code it?

Thanks for any help!

+3  A: 

The reason it uses license files is to make it cryptographically hard to make up licenses—you can't just write a keygen like you can with license numbers.

You can make this easy by making a custom file type for license files in your application's Info.plist. (This must be app-specific. When you begin your second product, you'll need to make a new type.) This type will have a custom, app-specific filename extension with it.

Then, when the user double-clicks on the license file (possibly in Mail), the OS will open it with your app. You'll handle this, probably in your app delegate, by feeding the license file to AquaticPrime to validate.

This way, the user does not even have to summon a dialog box, copy the license number, and paste it. All they have to do is double-click on the license file.

Thus, the license file makes it easier to register your application, not harder.

Peter Hosey
Hey Peter:Thanks for your reply. That makes sense - It's just that I don't normally do register applications this way. But it doesn't mean that it doesn't work better!
PF1
+1  A: 

If you have a trial version of your application that is unlocked then you can do the following.


1) Create a custom url scheme.

Follow the instructions on this posting but instead of http and https make your application respond to something like activate-com-mycompany-myproduct.

Once the user has run your application once any link in a browser like activate-com-mycompany-myproduct://somedata will automatically open your application.


2) Provide a product activation link in your final buy page of your web store and your email receipt. To make it simple for the user and not for you, append a unique id to the URL. Map the ID in a database, generate a license plist on the fly and push it to the user seamlessly.

Matthieu Cormier
A: 

In case someone else stumbles on this question: you might also want to take a look at CocoaFob. The keys it generates are rather long, but closer to the format you were after and still easy enough to cut and paste.

starkos