你应该如何(和使用)静态库在iPhone上 [英] How SHOULD you make (and use) static libraries on the iPhone

查看:128
本文介绍了你应该如何(和使用)静态库在iPhone上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AFAICS,任何严重的iPhone开发人员必须定期使用和使用静态库,或者将自己定罪于错误的,难以维护的,笨重的项目。但苹果拒绝提供任何官方文档的过程(只是循环引用:不要静态,使用动态!我们不允许动态在iPhone上,使用静态!)



我花了6个多月的时间试验这个;我在App Store上的多个iPhone应用程序中部署了静态库;我想出了一个基于通用二进制的漂亮的工作系统,当OS 3.x出来(LOL)时立即刷新; ...我现在有一个适用于所有版本的iPhone操作系统的新系统。



我已经在StackOverflow上阅读了有关这个主题的相关问题,不足以充分利用静态库,或者要求您使用一个或多个外部命令行工具,从而突破IDE。如果你不能让所有内容都可以在IDE中工作,那么IDE有什么意义?



我认为我发现了一种工作方式,完全在Xcode里面。但是我根据以往的经历,我真的很紧张,但是我真的很紧张,因为这个时间 - 最后! - 通过试验和错误,我实际上是正确的。



或... 更好的 ...我很想找到有人会告诉我你应该怎么做应该去做,苹果希望/想要/需要你做什么。



我的过程是充分的卷曲我写了两篇博客文章:


  1. 第一篇文章:基本假设和问题

  2. 第二篇:方法和分步过程

请注意:有许多我不知道的iPhone和Cocoa编程的事情,我应该;我知道我在做什么有很大的错误,但是我宁愿分享它,也许可以大声喊叫,而不是保持安静,永远不会学到我正在修复的东西。



思考?改进?或者甚至...我是一个完整的傻瓜,有一个非常,更容易的路线,我愚蠢,不能注意到我所有的搜索?



谢谢提前...

解决方案

您可能会发现本教程从最近完成此操作的人中有用:



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


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...

解决方案

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

这篇关于你应该如何(和使用)静态库在iPhone上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆