开发者

Is there any way to not show to the user my classes used to make a static library on the user machine?

开发者 https://www.devze.com 2023-01-26 02:32 出处:网络
I\'d like to develop a Mac application that builds custom static libraries for iPhone on behalf of the user.

I'd like to develop a Mac application that builds custom static libraries for iPhone on behalf of the user.

I know that I can invoke xcode from the terminal with -xcodebuild to build these static libraries on the user machine, but my problem is that I don't want show to the user my objective-c classes used for the static library.

So my question is there any way to not show to the user my classes? Instead of use -xcodebuild I have othe开发者_开发百科r some way?

Thanks in advance


I guess you want to prevent the users of your library to see the header files of your static lib, right? I guess this is really problematic, as a compiler requires the header files to compile properly.

What you can do is to provide a "stripped down" version of your headers to your class users.

I stumbled across this tutorial a while ago. If you want to keep the code of your classes "closed" to any developers who are supposed to use it, I suggest making it a static library. Alternatively you can make a Framework.

http://www.clintharris.net/2009/iphone-app-shared-libraries/

No worries, this is the same process for iOS and Mac OS X.


In short, No. Since your code will be compiled for the machine by gcc, the user need only intercept Gcc at the appropriate moment and read out the code.

You can make this more difficult (but not impossible) to intercept by piping the code directly into gcc from your application, and do some checks to validate that it's really gcc it's going to.

You can also precompile some of the code that is common to all users into a framework, and that means you don't need to distribute the source to that part.

0

精彩评论

暂无评论...
验证码 换一张
取 消