Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Licensing system for static library

I'd like to sell a static library for Cocoa Touch apps but want to protect it from being freely distributed. Has anyone tried this or have suggestions on a scheme(s) that I can build to handle it?

One example from the desktop world is a vendor sending a license key to you after purchasing the library. That key must be embedded in your app, which is what the library will look for at runtime. The problem is anyone can post the library and key on the web.

like image 340
4thSpace Avatar asked Mar 27 '26 08:03

4thSpace


1 Answers

Build a strong fast key-generator algorithm and partly base it on the purchasers bundle identifier. When someone purchases the library, they give you the bundle identifier and you give them a key to embed. In runtime, read the bundle identifier and the embedded key, run it through the algorithm and see if it matches.

This is a little better because someone is less likely to use a bundle identifier if it comes from someone else — they would have to setup multiple certificates, developer profiles etc. Also, a legal purchase would probably not reuse the library illegally between different app of his/her own.

like image 140
coneybeare Avatar answered Mar 30 '26 00:03

coneybeare