Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
798 views
in Technique[技术] by (71.8m points)

xcode - How SHOULD you make (and use) static libraries on the iPhone

AFAICS, any serious iPhone developer must make and use static libs on a regular basis, or else condemn themselves to buggy, hard-to-maintain, unwieldy projects. But Apple refuses to provide any official docs on the process (just circular references: "dont do static, use dynamic! ... we don't allow dynamic on iPhone, use static!")

I have spent more than 6 months experimenting with this; I have deployed static libs in multiple iPhone apps on the App Store; I came up with a nice, working system based on Universal Binaries ... that IMMEDIATELY BROKE when OS 3.x came out (LOL); ... I now have a new system that works with all versions of the iPhone OS.

I have read the related questions on StackOverflow on this topic, and they either don't go far enough for full usage of static libs, or require you to use one or more external command-line tools, hence breaking out of the IDE. What's the point in an IDE if you can't get everything to work inside it?

I think I've found a way that works, entirely inside Xcode. But I'm really nervous, based on past experience...

I would love some feedback on whether this time - finally! - through trial and error, I've actually got it right.

OR ... even better ... I would love to find someone who will tell me exactly how you are "supposed" to do it, how Apple expects / wants / requires you to do it.

The process I have is sufficiently convoluted that I've written it up into two blog posts:

  1. First post: basic assumptions and problems
  2. Second post: methodology, and step-by-step process

PLEASE NOTE: there are many things I don't know about iPhone and Cocoa programming that I ought to; I know there's a lot wrong with what I'm doing, but I'd rather share it and possibly get shouted at than keep quiet and never learn what I'm screwing up.

Thoughts? Improvements? Or even ... am I a complete fool, and there was a much, much easier route that I was dumb enough not to notice in all my searching?

Thanks in advance...

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You may find this tutorial useful from someone who has done this recently:

http://kyleroucis.com/Kyle_Roucis/Blog/Entries/2009/10/7_Custom_Embedded_Static_Library_for_iPhone.html


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...