您认为哪个OAuth库最适合Objective-C / iPhone? [英] Which OAuth library do you find works best for Objective-C/iPhone?

查看:141
本文介绍了您认为哪个OAuth库最适合Objective-C / iPhone?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻求切换到OAuth以获取我的Twitter集成代码,现在有不到7周的截止日期(参见倒计时链接),跳转到OAuth更为重要。我一直在做基本身份验证,这非常容易。不幸的是,OAuth似乎不会在几个小时内组合在一起。

I have been looking to switch to OAuth for my Twitter integration code and now that there is a deadline in less than 7 weeks (see countdown link) it is even more important to make the jump to OAuth. I have been doing Basic Authentication which is extremely easy. Unfortunately OAuth does not appear to be something that I would whip together in a couple of hours.

http://www.countdowntooauth.com/

所以我希望使用一个库。我把以下列表放在一起。

So I am looking to use a library. I have put together the following list.


  • MPOAuth

  • MGTwitterEngine

  • OAuthConsumer

我看到MPOAuth有一些很棒的功能,有很多测试代码,但有一个很大的问题。这是行不通的。应该通过Twitter进行身份验证的示例iPhone项目会导致其他人识别并记录为错误的错误。

I see that MPOAuth has some great features with a good deal of testing code in place but there is one big problem. It does not work. The sample iPhone project that is supposed to authenticate with Twitter causes an error which others have identified and logged as a bug.

http://code.google.com/p/mpoauthconnection/issues/detail?id=29

最后一次代码更改是3月11日,这个错误是在3月30日提交的。已经过了一个多月,这个关键错误还没有修复。所以我转到了MGTwitterEngine。

The last code change was March 11 and this bug was filed on March 30. It has been over a month and this critical bug has not been fixed yet. So I have moved on to MGTwitterEngine.

我下拉了源代码并将其加载到Xcode中。我立即发现存在一些依赖项,并且README文件没有明确的步骤列表来获取这些依赖项并将它们与项目集成以便成功构建。我认为这表明该项目在黄金时段还不够成熟。我还看到,当一个应该足够时,该项目引用了2个JSON库。一个是TouchJSON,它对我来说效果很好,所以我再次不愿意依赖这个项目来处理我的应用程序。

I pulled down the source code and loaded it up in Xcode. Immediately I find that there are a few dependencies and the README file does not have a clear list of steps to fetch those dependencies and integrate them with the project so that it builds successfully. I see this as a sign that the project is not mature enough for prime time. I see also that the project references 2 libraries for JSON when one should be enough. One is TouchJSON which has worked well for me so I am again discouraged from relying on this project for my applications.

我确实发现MGTwitterEngine使用OAuthConsumer这是一个由Google Code上的OAuth项目托管的许多OAuth项目。

I did find that MGTwitterEngine makes use of OAuthConsumer which is one of many OAuth projects hosted by an OAuth project on Google Code.

  • http://code.google.com/p/oauth/
  • http://code.google.com/p/oauthconsumer/wiki/UsingOAuthConsumer

看起来OAuthConsumer乍一看是个不错的选择。它与其他OAuth库一起托管,并有一些很好的文档。我删除了代码,它构建没有错误,但确实有很多警告。当我在Xcode 3.2中运行新的Build and Analyze功能时,我看到50个分析器结果。许多被标记为潜在的内存泄漏,这可能会导致使用此库的任何应用程序的不稳定。

It looks like OAuthConsumer is a good choice at first glance. It is hosted with other OAuth libraries and has some nice documentation with it. I pulled down the code and it builds without errors but it does have many warnings. And when I run the new Build and Analyze feature in Xcode 3.2 I see 50 analyzer results. Many are marked as potential memory leaks which would likely lead to instability in any app which uses this library.

似乎没有明显的赢家,我必须使用某些东西在大型Twitter OAuth截止日期之前。

It seems there is no clear winner and I have to go with something before the big Twitter OAuth deadline.

有任何建议吗?

推荐答案

我已经使用了bengottlieb的 Twitter-OAuth 而没有任何问题。

I've used bengottlieb's Twitter-OAuth without issues.

Build + Analyze只发现一个问题(在SA_OAuthTwitterController.m中),这只是一个在初始化期间存储的值从未被读取的变量。我在使用它时没有看到任何泄漏。它实现起来很简单,到目前为止(商店中使用它的两个应用程序,开发中的第三个应用程序)没有任何问题。

Build+Analyse finds only one issue (in SA_OAuthTwitterController.m) and that's just a variable that has a value stored during initialization that is never read. I've not seen any leaks in my use of it. It was simple to implement and so far (two apps in the store using it, a third in development) no problems at all.

这篇关于您认为哪个OAuth库最适合Objective-C / iPhone?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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