开发者

Is it ok to include other frameworks or libraries in my framework?

Background: I am about to start preparing my 1st framework for my clients, so they can easily integrate it into their apps and fetch data fr开发者_如何学Com my servers without dealing how communication with server is working. I chose ASIHTTPRequest library for communication.

Question: how should I deal with ASIHTTPRequest or any other static library - make it a part of my framework or let adopters link against it themselves in their projects?

I'm opting to make it a part of my framework, so I can prevent users from setting breakpoints in ASIHTTPRequest and easily access/log connection frames/data. But what would happen if my clients will need this library for their own purposes? Will they be able to link it second time? Won't it cause any run-time collisions?

Sorry for wording... Please let me stand corrected if I'm confusing any terms :)


Look at how ASIHTTPRequest handle it :)

They make you link against lots of the iOS frameworks but they don't ship them with their download.

However, they do ship code for Reachability with their library - if you don't already have it then you can include it. If you already have it in your project then that's OK too.

I would ship the source of ASI in a seperate folder - then your users can either include it or not.

That also has the benefit of ensuring that the version of ASI they use will work with your library ;)

(see the ASI docs here)


There are two different types of frameworks to consider, so I would do two things:

  1. For any third party library like ASI that you use, include a directory with the source as deanWombonurne indicated. Make sure to indicate which version of the library you have included if it is not clear (add a VERSION) file if needed or name the directory).

  2. For Apple frameworks, include a manifest file somewhere that gives a list of all the Apple frameworks they should include in their project to satisfy your framework requirements.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜