Share the code in a secure way Objective-C
Just I'm curious. I have created a lot of convinient categories to the Objective-C classes (NSObject, NSDictionary, NSString...), as long as very interesting subclasses that makes a lot of popular task in the iPhone/iPad programming, to be as easy as putting only one line of code or firing a method.
I'd like to share this code with others but the problem is, I don't want them to see the real code as long as I spent hours on creating it. Perheps in future I'd also like to sold this piece of code.
So let's assume the file is called Extensions and is divided into two files: Extensions.h (where are abou开发者_StackOverflow社区t 100 headers) and the Extensions.m - their implementations. I'd like to distribute this class in a way that Extensions.h is 100% public - developer sees the code I've put in that file so he knows how to use those extensions, but Extensions.m should not be visible as a code, but as a library or something like that.
I also would like to make the implementation of above in the custom projects as easy as possible. The best way would be just drag'n'drop and #import Extensions.h in the header.
I'm looking forward to hearing you advices. Regards Chris
Flurry does this... they distribute a .h file with the headers and a .a file with the code. So looks like you could compile a .a file for distribution.
精彩评论