Share some part of a static library
I'm pretty new to static libraries. I recently created one library because I have a lot of source code, and the updates of my projects ended as a nightmare. So, this is a static library for iPhone. My question is quite simple : I use this library for me and my company. But, how can I use a portion of it to make projects for my clients ? For example, I have a class 开发者_如何学编程which reads PDF or Photos, depending of the initialization parameters. I don't want my client able to use the photo part, just by seeing the headers. How can i achieve that ? I thought to remove some parts of the headers i will give to my client, but i'm pretty sure there are better options.
Thanks
Presuming you are using objective C code, it will not be enough to just remove the headers since a smart client will be able to "ask" the code about its interface by using class-dump
.
So if you want to be certain that the code is not available to your clients, you need to remove it completely from your static library.
Update: CocoaReverseEngineering provides information about how to access the hidden information in frameworks and libraries. But you can also use it so you know what's possible and thus preventing it happening.
精彩评论