Stable way to embed open-source code into static l

2019-03-05 12:03发布

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?

1条回答
迷人小祖宗
2楼-- · 2019-03-05 12:46

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 (e.g. renaming SBJSON classes) is NOT a way to go.

查看更多
登录 后发表回答