开发者

External Static(.a) Libraries in iPhone projects

Over the last few months I've come across various chatter of external/private libraries not being allowed in iPhone apps.[Just to be clear, this is not something thats going to come, its something I was wrongly under the impression that already exists.]

I was looking at the WunderRadio source: http://www.wunderradio.com/code.html and I noticed they have 3+ .a files in there project.

libcCommon.a liblibmms.a and 开发者_C百科libffmpegLib.a are the ones I'm looking at.

Have I been misinformed about the use of this kinda of libraries in iPhone projects? Will Apple accept and approve projects that are using them? If so what is it thats not allowed? Is it just use of Apples own private and undocumented libraries, but you are allowed to include your own?

Many Thanks, -Code


Static libraries have always been allowed for iOS development and there is no sign that position is going to change at any point (why would it?). Dynamic libraries are not allowed and will result in the rejection of your app.


I think they'd be crazy to do that.

There are so many 3rd party libraries out there that it would pretty much kill the developer crowd they've got now. Imagine if you had to write every library over, from scratch? That's nuts...

Of course, I have no proof one way or another. I just think they'd be insane to try and do that.


.a files are called static libraries. When you build your code, they essentially get compiled in at build time. These are definitely allowed by Apple. In fact, XCode provides a template for a "Cocoa Touch Static Library" when creating a new project.

.dylib files on the other hand are dynamic libraries and are not allowed by Apple. They are separate code files that can be shared by multiple applications as their code gets brought in to your app at run time.

Saurik (the guy who created Cydia) solved this issue by creating Mobile Substrate for jailbroken iPhones. It allows devs to create dynamic libraries in order to alter the functionality of existing Apple classes.

Hope this clears the issue up.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜