Search code examples
objective-ciosxcodestatic-librariessbjson

Static library with SBJson for iOS


I'm developing a static library where i need to use the open source SBJson class.

what is the best way to include the SBJson class to my library without needing to include all its header files(.h) when distributing my static library ??


Solution

  • The best way is not to (attempt to) hide the dependency, and then tell the clients they will need to build and link to the SBJson library.

    The safe alternative would be a fork of SBJson with all symbols redeclared as different names (e.g. a unique prefix). This will ensure your client has zero hassle linking your library with their dependencies.