简体   繁体   中英

Stable way to embed open-source code into static library in iOS?

I'm making a static library for distribution for other developers. In other words, a kind of API.

And I have to use bunch of open-source libraries like SBJSON , ASIHTTPRequest . I think it'll make an name conflict problem if I embed these classes into my library at source level. As I know, Objective-C runtime doesn't support private classes.

So it there a way to include those classes into my library without name conflict?

Just don't!

Simply tell your users that they shall link SBJSON or ASIHTTP into their app to get your stuff working. That is the way those issues should be handled. There is nothing wrong in having a dependency in your library. Solving this by refactoring a standard library (eg renaming SBJSON classes) is NOT a way to go.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM