Objective-C Library C Wrap Tips

I have a library written in C that I would like to use in an Objective-C application, either on a Mac or on an iPhone.

Unfortunately, since this library is written by individuals in an open source space, the documentation is rather scarce and incomplete. Although I can understand how to use the material in the library, I really do not have an overview of the entire code base.

What I would like to do is wrap the library in some easily used and portable classes in Objective-C.

  • Does anyone have any tips on how to approach this?
  • Any tips on the best way to get the visual hierarchy of the library structure?
  • How do I decide how best to structure my shell for reuse and ease of use?

Any help would be greatly appreciated, thanks!

+5
source share
3 answers

I have done this several times myself. It may be interesting - this is your chance to fix (or at least hide) bad code!

You can use Doxygen to get a visual hierarchy of code (although I only used it for C ++ libraries, this also works with C) or with any other free tools.

-, , . , . , , / , .

, , , Adapter Facade.

+7

-, : C Objective-C. - , , .

-, , , . , , , . , , .

+2

ARC ( ) Apple, Objective-C C . ( ARC.) , "" . . SO , , Apple Obj-C C.

0

All Articles