How can I restrict any developer from using my created static library?
I have created one static library in iPhone sdk, and I am worried that If I provide code to anyone in which static library is being used, then anyone can use static library. So Is there any way to restrict them by using library until they 开发者_开发技巧get license? I am new to licensing any library.
This is a problem you must solve by legal means, not by any technical solution.
Make sure to only give the library to people you trust, and if needed have them sign an agreement not to spread it.
Also ask yourself if it is worth the trouble. Is your code so unique that they can not find it elsewhere, or duplicate it themselves in a few days, using Google and stackoverflow alone?
As said by @PeyloW,
This is a problem you must solve by legal means, not by any technical solution.
But there are some simple ways to "block the code": You can create a RAR or ZIP archive, encrypted with password, and after they get license, you can tell them the password.
If you want to "Bind" license to a "developer's computer", than you simply need something that you can bind. For example that can be the emulator's UDID.
you can generate a license for emulator's UDID, and only limit emulator development, while allowing unrestricted access for ARM code (on device)
- so you can basically check for emulator UDID
- check license file
- if license file allows that UDID, run
- if not then show a message etc
for development purposes, everybody needs emulator, so I guess limiting it is enough for you.
Personally, I would create a new static library, check your code coverage and copy in only the code used by the app consuming it. Or in other words, don't give away more than you need to.
Then, as someone mentioned in the comments, obfuscate the calls. Your library is going to be worthless without documentation if your calls have to be deciphered. Odds are that anyone that has the aptitude of deciphering what your calls mean probably has 80% of a white-room reverse-engineering of your code already done.
You can't really force a license upon your client at the final hour unless they agree to it. So even if you did try to force them to license your library, it might not even be valid to do so with the original agreement intact. I'd do damage control to the extent your time is worth and chalk this up as a learning experience. 5 months from now, you'll probably have that static library re-factored to something better anyway. And next time, you'll work that into your agreement.
If you provide the static library, no one can get back the code.
Do you have reservations in others using your static library also?
精彩评论