Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

JOD8FY

macrumors 6502a
Original poster
Mar 22, 2004
633
0
United States
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

macrumors regular
Jan 11, 2006
137
1
West Palm Beach
This is something that I was worried about too, but I found a wonderful solution. Aquatic Prime, by Lucas Newman. I use it for YummySoup!. 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

macrumors 6502a
Original poster
Mar 22, 2004
633
0
United States
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

macrumors regular
Jan 11, 2006
137
1
West Palm Beach
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

Guest
Feb 17, 2003
2,390
1
Hitchin, Herts, UK
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

macrumors 6502a
Dec 12, 2005
576
18
Adelaide
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.
 

HungrySeacow

macrumors regular
Jan 11, 2006
137
1
West Palm Beach
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

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
There used to be a tutorial here 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

macrumors 6502a
Original poster
Mar 22, 2004
633
0
United States
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.