iphone开发常用开源库4---Useful open source libraries for IPhone Development

iphone开发常用开源库4---Useful open source libraries for IPhone Development,第1张

概述Useful open source libraries for IPhone Development It’s been almost 3 months since the IPhone SDK’s infamous NDA restrictions were lifted, and there are now a good set of open source libraries availa Useful open source libraries for IPhone Development

It’s been almost 3 months since the IPhone SDK’s infamous NDA restrictions were lifted,and there are Now a good set of open source librarIEs available for the IPhone. In this post I will go through the ones that I kNow of one way or another. If you are aware of more high quality open source projects,please let me kNow in the comments so that I can update this post.

JsON library

Currently,there are 3 choices that I kNow of:

JSON Framework: I used this one in one of my projects,and dID not run into problems. Recently after the update to the new SDK 2.2,you may need to make a quick change to your project as outlined at the end of this discussion.

Touch JSON: This one is from the same project owners as the TouchXML.

Blake Seely’s BSJSONAdditions: This one is little older and intended for the Mac originally. According to the author of the JsON Framework a little slower as per his performance benchmarks

DOM XML library

IPhone SDK includes an event driven (SAX based) XML parser called NSXMLParser. But if you need DOM style parser,you are out of luck unless you use the libxml2 library directly. There is no MacOS X equivalent of NSXML on the IPhone.

However luckily there are at least 2 options that I kNow of that you might use if you really need the DOM tree:

TouchXML: Open source lightweight replacement for Cocoa’s NSXML cluster of classes based on libxml2.

Matt Gallagher: Wrote a lightweight wrapper on top of libxml2 and describes this in his blog entry.

However note that in a memory and cpu constrained environment like IPhone,it does make more sense to use an event driven parser (probably why Apple decIDed not to include NSXML in the first place). There is a recent SDK sample called XMLPerformance that shows parsing large number of items in an efficIEnt way using both the NSXMLParser and the lower level SAX parser provIDed in libxml2.

Google Data APIs

So you would like to access Picasa,Google Calendar,Google Contacts and more… Well there is a very comprehensive ObjectiveC Client Library that you can include as a static library in your applications.

Twitter

Craig Hockenberry of the awesome Twitterific fame,made the source code of the Mobile Twitterificavailable to serve as a “Best Practices” document. There you can find how to connect to Twitter,get and post tweets etc.

Flickr

Unfortunately the well-kNown Cocoa API for Flickr is still not ported to the IPhone. However it looks like they are working on porting it to IPhone as of November 2008.

Game Engines

There are at least 3 game engines that I kNow of:

2D Gaming – Cocos 2D: This one is intended for 2D games,demos and other graphical/interactive applications. It is a port from the Python based cocos2d design. It uses Open ES 1.1,instead of the Quartz 2D and integrates the Chipmunk 2d physics engine.

3D Gaming – SIO2 Interactive: A 3D engine written in C using OpenGL ES.

3D Gaming – Oolong Engine: Mainly written in C++ with some ObjectiveC. Based on OpenGL ES 1.1 and includes the Bullet 3D physics engine.

You can also take a look at some IPhone game source code:

Tris: The source code for the Tetris clone that was pulled out of the Appstore earlIEr.

Molecules: This is not a game,but serves as a good tutorial for OpenGL ES development.

Unit Testing and Mock Frameworks

As of IPhone SDK 2.2,Apple Now includes the OCUnit. This was discussed in the Stanford IPhone Application Programming course and you can download the presentation and the sample. So right of the bat you are Now set up for unit testing,no more excuses.

Google actually has a more comprehensive framework in their Google Toolbox for Mac that even includes support for UI testing.

There is also a mock object framework called OCMock that is designed for MacOS X Cocoa,but with a little bit of work you can get that to work for your IPhone projects.

总结

以上是内存溢出为你收集整理的iphone开发常用开源库4---Useful open source libraries for IPhone Development全部内容,希望文章能够帮你解决iphone开发常用开源库4---Useful open source libraries for IPhone Development所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1067000.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存